Subform Control Not Loading In Access Runtime

D

David

Hello,
I have a subform control called subfrmctl1 which uses a QUERY as the
datasource.

The subform control displays the data in a datasheet format as expected in
Access 2000 under Windows XP.

When I run the same under Access 2000 Run Time under Windows XP, the subform
does not display.

See the code below.



' Get the source of the data (in this case, query.qrytablisting)
strQry = Forms!frmPatentListingByCriteriaScore!subfrmctl1.SourceObject

' I then run 4 queries to get the data as expected

With Forms!frmPatentListingByCriteriaScore!subfrmctl1
.SourceObject = strQry
.Requery
End With

Any ideas?

Thanks.
 
A

AccessVandal via AccessMonster.com

Hi David,

What is the subform's property Data Tab's "Link Child Fields" and Link Master
Fields"?

If the form's sourceobject was "strQry" then the subform's sourceobject will
become "strQry". So....there's is nothing.

Insert after the line with this "Debug.Print strQry" and view it in the
immediate window for the syntax of your SQL string.
 
D

David

Hi,

There is no true subform, just a subform control, whose datasource is a
query named qrytablisting.
 
A

AccessVandal via AccessMonster.com

Hi David,

It doesn't matter. Still the question was , What was the "subform control's"
property Data Tab's "Link Child Fields" and Link Master Fields"?
 
Top