data update

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

Guest

i have created a form with combo boxes and command buttons that open
forms for data insertion. the combo boxes get the data from the
forms. when i close the forms, in order for the combos to show the
new data i have to close the main form and reopen it. is there
a way to avoid that?
 
angie said:
i have created a form with combo boxes and command buttons that open
forms for data insertion. the combo boxes get the data from the
forms. when i close the forms, in order for the combos to show the
new data i have to close the main form and reopen it. is
there
a way to avoid that?

Sounds like you just need to requery the combo:

Me.ComboboxName.ReQuery
 
where do i have to put the code or macro to
requery the combo? on the on click event for example?

thank you in advance for your reply

Ο χÏήστης "Stuart McCall" έγγÏαψε:
 
angie said:
where do i have to put the code or macro to
requery the combo? on the on click event for example?

You need the requery to occur when you close your input form(s). If you are
opening your form with DoCmd.OpenForm, using acDialog as the WindowMode,
then you should do the requery immediately following that. If not, then
place some code like this in the input form's Close event procedure:

Forms!MyFormName.ComboboxName.ReQuery

substituting your actual form name and combo name, of course.
 

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

Back
Top