mamadouthiam
asked on
Requery an unlinked subform
I have a subform (one of several on a larger form) that is not linked to the form. It is just sitting there displaying information.
On the form itself, there is a combo box which (upon picking a value) provides the parameter for the query that underlies said subform. However, when I try to have the subform update when changes in the combo box are made- no joy. I tried a requery after update on the combo box but I imagine the problem to be that since there is no link between the main form and the subform that this does not occur.
The question is...How can I force the requery on this unlinked subform when a change in the combobox is made?
Thanks,
mamadouthiam
On the form itself, there is a combo box which (upon picking a value) provides the parameter for the query that underlies said subform. However, when I try to have the subform update when changes in the combo box are made- no joy. I tried a requery after update on the combo box but I imagine the problem to be that since there is no link between the main form and the subform that this does not occur.
The question is...How can I force the requery on this unlinked subform when a change in the combobox is made?
Thanks,
mamadouthiam
yes, that works OK - Ive just tested it here.
Pete
Pete
ASKER
Pete,
I tried but I got the error that the database can't find a macro entitled me.subreportcontrolname.Fo rm.requery . Any idea why it thinks the "me" is referencing a macro?
mamadouthiam
I tried but I got the error that the database can't find a macro entitled me.subreportcontrolname.Fo
mamadouthiam
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Pete,
You got it.
I put the code in the expression builder not in the VBA. OOops.
Many thanks
You got it.
I put the code in the expression builder not in the VBA. OOops.
Many thanks
I would guess that the code you neeed is:
me.subreportcontrolname.Fo
in the afterupdate event procedure of the combobox.
Pete