Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting RecordSource on subform question

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
I have a form named "Library Item Data" that contains a subform named "LocatorMain".

The LocatorMain subform contains a datasheet subform named "LocatorQuantity"

I need to allow the user to requery the subform "LocatorQuantity" so I put a control button on the subform "LocatorMain" and in the on-click event, placed the following code:

Forms![Library Item Data]![LocatorMain]![LocatorQuantity].RecordSource = "LocatorAll" (LocatorAll is the name of a query)

Access gives me the error message :

Object Does Not Support this Property or Method

Perhaps someone might have an idea how to code this ?
I have been able to successfully change the record source on forms before but this is the first time i have had to do it on a form that has a subform with a subform (3 deep)

Thanks

Paul
 
Yor code should be like this:

Forms![Library Item Data]![LocatorMain].Form![LocatorQuantity].Form.RecordSource = "LocatorAll"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top