requery subform after table update

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

Guest

I have a member form which displays information about a member's family. I
have an employment subform that lists each family member and the company they
work for. The company field is a combo box.

I have a command button on the employment subform that opens opens a form to
enable the user to add a new company to the lookup table if the company does
not already exist.

When the company form is closed I want the CBO on the employment subform to
have the updated value. Right now I have to either close out of the form and
reopen or have the user click the F9 button. Is there a way to program that,
so that the list is refreshed automatically?

Thank you! This is driving me nuts.

Meryl
 
Hi Meryl,

In the on close event (or the click event of your close button) have the
following code:

forms!FORMNAME.SUBFORMNAME.form.COMBONAME.requery

Damian.
 
Damian,

I put in the code, but it's not requerying when the table form is closed. I
put the code in the On Exit event. Is that correct or shoudl it be somewhere
else?

Thank you.
Meryl
 

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

Similar Threads

subform 2
Subforms 1
Database subform 6
Combo box search from main form to subform 1
Form/subform 1
Requery subforms 3
Requery Subform 4
List box in main form AND in subform 6

Back
Top