running a query via a macro

  • Thread starter Thread starter coalchamber
  • Start date Start date
C

coalchamber

Hello all,

alright, hopefully this will be easy to explain.

I have a combo box which is base don a query. The query basically
compares 2 table and whatever ones which are in one but not the other
are put in the combo box. Now, the user picks something from the combo
box, and presses that little next arrow down the bottom, writing it to
the table.

Now, i have to create a macro which will only run the query. I know
openquery will run it, but i don't want it visisble at all. I tried
requery but seeing as i have to place this macro in on of the form
events (on current) rather then the combo box, it gets screwed up.

Any suggestions?

Thanks
 
Hello all,

alright, hopefully this will be easy to explain.

I have a combo box which is base don a query. The query basically
compares 2 table and whatever ones which are in one but not the other
are put in the combo box. Now, the user picks something from the combo
box, and presses that little next arrow down the bottom, writing it to
the table.

Now, i have to create a macro which will only run the query. I know
openquery will run it, but i don't want it visisble at all. I tried
requery but seeing as i have to place this macro in on of the form
events (on current) rather then the combo box, it gets screwed up.

Any suggestions?

Thanks

Or, is there anyway to refresh the combo box?
 
Coalchamber,

If I understand you correctly (which I am not sure of), I think you need
to use a Requery of the combobox. I am not sure what you mean by
"screwed up". One option would be to use the Enter event of the combobox.
 
Back
Top