Open an object listed in a Combo Box

T

Terry

Is it possible to open an object from a Combo Box, (using the OnClick
event), by clicking on an item in the dropdown list?

I have a Combo Box which lists all queries in my database. I know it
can be done by adding a Command Button but I just wondered if this was
possible as I am short of space on my form.

Terry
 
F

fredg

Is it possible to open an object from a Combo Box, (using the OnClick
event), by clicking on an item in the dropdown list?

I have a Combo Box which lists all queries in my database. I know it
can be done by adding a Command Button but I just wondered if this was
possible as I am short of space on my form.

Terry

The query name is the bound column of the combo box?

Code the AfterUpdate event of the combo box:

DoCmd.OpenQuery Me!ComboName
 
T

Terry

fredg said:
The query name is the bound column of the combo box?

Code the AfterUpdate event of the combo box:

DoCmd.OpenQuery Me!ComboName

Hi Fred,

Actually it's an unbound ComboBox but the Row Source is set to:-

SELECT QyeryList.Name FROM QueryList;

Works fine!

Thanks Fred
 

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