Subform Control Not Loading In Access Runtime

  • Thread starter Thread starter David
  • Start date Start date
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.
 
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.
 
Hi,

There is no true subform, just a subform control, whose datasource is a
query named qrytablisting.
 
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"?
 
Back
Top