Cannot requery a control on a subform from another subform

J

John

Very simple - after adding a new record in a subform, I am trying to
requery a combo box in another subform but I keep getting the error
(You entered an expression that has an invalid reference to the
property Form/Report).

I read numerous posts on this and this syntax is suppose to work:
Me.Parent!frmCustomerToursSubform.Form!cboCustomerID.Requery

I have confirmed over and over that the name subform control (which is
the same name as the subform) is frmCustomerToursSubform and the name
of the combox is cboCustomerID but I still get this error.

Can anyone siggest something else I could try?

Thanks.
 
G

George Nicholson

Syntax seems OK to me. Try putting a breakpoint on the line. When triggered,
use the Immediate window to try and figure out what is causing the problem.
For instance:
?Me.Parent.Name
?Me.Parent!frmCustomerToursSubform.Form.Name
?Me.Parent!frmCustomerToursSubform.Form!cboCustomerID.Name

This won't solve your problem, per se, but it should pinpoint the problem,
which may lead to a solution (aka, a Eureka moment).

HTH,
 

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