Requery subform data

R

Ren

When I am trying to requery subform, it is not recognizing it as a valid
object.

I have an unbound combo box on my parent form that I am using to look up the
customer name and populate my subform with the address, etc. based on a name
match. I have the custno on my parent form and I am passing the custno back
based on a name match. I used that as the child and the master fields. I
have the same syntax in another db that works, so I checked to make sure I
had all of the same reference libraries attached but it is still not working.
Here is the syntax
Forms("CustNames").ctlSubForm.Requery. Any help would be appreciated.
Thank you.
 
D

Douglas J. Steele

You're actually trying to requery the form that makes up the subform, not
the subform control itself.

Try:

Forms("CustNames").ctlSubForm.Form.Requery

If that doesn't work, make sure that ctlSubForm is actually the name of the
subform control, and not just of the form being used as a subform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top