Message box with Combo box function

A

Asif

Is it possible to create a combo box within a message box i.e. when
the user clicks on preview report a message box appears and says
"which report do you want to open?" and a combo box displays the
different reports available with the user clicks, upon clicking the
relevant report opens

Thanks
 
B

Bob L.

* Asif said:
Is it possible to create a combo box within a message box i.e. when
the user clicks on preview report a message box appears and says
"which report do you want to open?" and a combo box displays the
different reports available with the user clicks, upon clicking the
relevant report opens

Thanks
Just use an unbound form with the combo box on it.

Bob L.
 
A

Asif

Just use an unbound form with the combo box on it.

Bob L.

Thanks but how is it possible to open a repot by clicking on a value
from the combo box i.e. if the user clicks on e.g science from the
combo box then the rpt_science opens up and if they click on lanauge
the rpt language opens up?

Any suggestions
 
D

Douglas J. Steele

Asif said:
Thanks but how is it possible to open a repot by clicking on a value
from the combo box i.e. if the user clicks on e.g science from the
combo box then the rpt_science opens up and if they click on lanauge
the rpt language opens up?

In the AfterUpdate event of the combo box, put code like:

Private Sub MyCombo_AfterUpdate()

DoCmd.OpenReport Me.MyCombo, acViewPreview

End Sub

Now, this assumes that MyCombo contains the actual name of the report. If
the combo box contains science and the report is named rpt_science, you'd
need to change the OpenReport line to

DoCmd.OpenReport "rpt_" & Me.MyCombo, acViewPreview
 

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