How to update the data of a combo box

E

ericb

In a form I have tab pages

One is for consultation data it is a subform link to consultation table. The
other page is Examen subform in which you have a combo box that will list the
consultations of a client.

The problem is when I add a new consultaion record for a client it does not
appear in the list. I have to select another client and then come back to the
preveous client to see the new entry.

For this combo I run Me.my_combo_box.requery on the current and load event.
Somehow this does not refresh or update or ??? my list.

What should I do ?

Thank you.
 
J

John Spencer

As a guess, you need to force the new record to be saved before you do the
requery of the combobox. Otherwise the record does not yet exist and the
requery does not see the record.

OR

You need to do the requery after you have created the new record in the
subform. Perhaps a line like

Me.Parent.my_combo_box.requery

could be added to the after insert or after update event of the Examen subform


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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


Top