how do i link a combo box with a query

G

Guest

Let me start by saying I am new to access and think it is a great program
causing me lots of head aches. I took a class on introduction to database,
which helped a lot but also caused some confussion.
I have a form in which I placed a unbound combo box. In it I typed the
names of about 72 update queries. I also put a command button that I want
someone to beable to select a query name then click the one command button to
run that query. My problem is if you can do it I need it kept as simple as
possible, because I know nothing about writing code. (Thats my next class) I
know where to copy it to if someone can give it to me. Thanks for the help
 
G

Guest

Try this code in the OnClick event of the button

' Set the warnings to false if you don't want the user to be prompt with
messages
Docmd.SetWarnings False
Docmd.OpenQuery Me.[Enter here ComboBox Name]
Docmd.SetWarnings True
 

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