Problem with activeX button

B

B Oliphint

I would like to have the user click on an activeX (or form) button and then
have a window pop up with the following message and options: "Caution:
resetting the form will cause data to be lost. Please print current form and
enter data into LIMS before resetting the form."

Three buttons would follow this message>>Print, Reset Form, Cancel
 
J

Jon Ley

Hi there,

I think what you need to do is:

1. Design a form that has the message and buttons that you've described.
Include a hidden test box called txtResponse. The code behind each the three
buttons should set the a different value for txtResponse and then hide the
form (Me.Visible = False)

2. When the user clicks the button on your main form, open this new form
with the acDialog option:

DoCmd.OpenForm "frmCheckResponse", , , , , acDialog

The line after this code can check the value of the txtResponse text box and
act accordingly:

Select Case Forms!frmCheckResponse!txtResponse
Case ...
...
End Select

3. Don't forget to close the new form (it's currently only hidden):

DoCmd.Close acForm, "frmCheckResponse"

Hope this helps,

Jon.
 
Top