How do I write a "requery" statement for a subform?

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

Guest

I'm trying to requery a subform when the form it is attached to is "on
activate".

Example: Form A contains subform B, Form A has a control to open Form C.
On Form C a new entry is added, then form C is closed. Subform B, contains a
combo box which needs to show the new entry added from form C.

please help....thank you
 
You can try this:
--
Forms![FormB].ComboName.Requery
Forms![FormB].ComboName = NewAddedValue
--

NewAddedValue is new entry added from form C. You have to store this value
in order to use it later, or just instead NewAddedValue put
Me.ComboNameOnFormC.Value.
You have to add this piece of code to your OnClose() event on FormC, or on
some ButtonEvent
It can be used for any loaded form, not only for formB.
Vojislav Depalov
 
Back
Top