Message box with Combo box function

  • Thread starter Thread starter Asif
  • Start date Start date
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
 
* 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.
 
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
 
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
 
Back
Top