Your example was:
[Forms](txtFormName).C ontrols(txtComb oName).Requery
That cannot work if txtFormName contains the name of a subform control,
since subforms are not part of the Forms collection. Loop through the forms
and verify for yourself that the subforms are not there:
Dim i As Long
For i = 0 to Forms.Count -1
Debug.Print Forms(i).Name
Next
If you just want to requery a single combo, the public object variable will
do it.
To answer your question, what I actually do is to call a public function
named NotifyCombos() in the AfterUpdtate and AfterDelConfirm of all forms.
The function is completed after the database is built, and it consists of a
massive Select Case statement that handles all the dependencies so that any
open forms are notified of the change.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<Ap******@gmail .comwrote in message
news:11******** ************@v3 3g2000cwv.googl egroups.com...
Allen, is that to say that a popup form cannot reference the subform
that originally called it? Then how do you guys refresh a combobox
after its table contents change, having used the popup form method? Is
there another approach?
If its the one you suggested, I really dont understand it, and a
weblink might be helpful. I checked out the Link to "Referring to
Controls on a Subform", and still think my problem somehow has
something to do with syntax?
Thanks As Always
Greg