Is there a way to where I can Click on a field and a message box pops up and
says
Pre Approval or Final. Then I can click on which one and it will open that
report?
so instead of yes or no, it would say Pre Approval Final
Thanks
Chey
Sure.
Create your own, unbound form to be used as a message form.
Add 2 command buttons.
Caption one to say "Pre Approval"
Name it cmdPreApproval
Caption the other to say "Final"
and name it cmdFinal
Add a Text control. Leave it's control source blank.
Name the text control "txtValue"
Code the cmdPreApproval button's click event:
Me!txtValue = 1
Me.Visible = False
Code the cmdFinal click event:
Me!txtValue = 2
Me.Visible = False
Name this form "frmMessage"
You would then open the form, from the click or double-click event of
a control on your main form using:
DoCmd.OpenForm "frmMessage", , , , , acDialog
If forms!frmMessage!txtValue = 1 then
DoCmd.OpenReport "Pre Approval Report", adViewPreview
Else
DoCmd.OpenReport "Final Report", acViewPreview
End If
DoCmd.Close acForm,"frmMessage"
When the form is opened processing waits (just like a MsgBox) until
you click either command button. Then the Yes or No action will be
taken and the form closed.