Rerun Query OnEnter of ComboBox ??

G

Guest

Can I use the DoCmd.Requery OnEnter of a ComboBox so that when the combo box
is entered or clicked on it will RERUN my original query control source to
ensure that the most up-to-date data gets displayed? My ComboBox is based on
a Select Query which displays my results for the form. I already have a
"Current" event procedure acting a search function for my combobox too. Will
they interfere with one another.

Is there a different function or property I should use instead?
 
G

Guest

Thanks for your reply Dennis.
And this will force the query to execute itself again? I just want to be
sure because the query is based on linked ODBC Tables and other people are
constantly updating them throughout the day.
 
G

Guest

Yes.

la knight said:
Thanks for your reply Dennis.
And this will force the query to execute itself again? I just want to be
sure because the query is based on linked ODBC Tables and other people are
constantly updating them throughout the day.
 
G

Guest

Dennis, I tried the command on my form and it doesn't work. It must only
requery the results of the initial query and it must have something to do
with the fact that my Tables are linked from an outside ODBC connection
because I tried the same command on the sample database NorthWind Traders and
it worked great, but I'm assuming it's because all the tables are internal.

Any other thoughts?
 
G

Guest

Dennis,

The command (Me.MyField.Requery) didn't work for me, but I adjusted my code
a bit, then tried (Me.Recordset.Requery) and that worked.

Thanks for your help!
 

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

Top