Requery subform data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
Back
Top