Combo Boxes

G

George Schneider

I have a combo box with values from a table. I want to have a command button next to the combo box to open a report based on the result of the combo box. For example if value in combo box is accounting then oopen the report named accounting. How can I do this in vb.
 
M

Marshall Barton

George said:
I have a combo box with values from a table. I want
to have a command button next to the combo box to
open a report based on the result of the combo box.
For example if value in combo box is accounting then
open the report named accounting.
How can I do this in vb.

The VBA code in the button's Click event procedure would
look something like:

DoCmd.OpenReport Me.thecombobox, acViewPreview

as long as the combo box's bound colunm is the column that
contains the exact name of the report to be opened.
 

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