J
John
Hi,
On a form I have a command button which invokes a maketable query from
selections on the form.
This works great but I would like to have a messagebox prompt the user for
instructions.
If the user click OK then the make table quesry is run, if the user clicks
cancel I would like the routine to stop!
Could some one please take a look at the code below and tell me why I cannot
make the vbOkCal buttons work.
Private Sub MakeTable_Click()
MsgBox "Select Batch will create a new batch of labels ready to print,
this overwrites all previous batch labels created. Do you want to
continue?", vbOKCancel, "Batch Print Selection"
If vbCancel Then
exit sub
else
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryMakeBatch"
End If
End sub
Regards
John
On a form I have a command button which invokes a maketable query from
selections on the form.
This works great but I would like to have a messagebox prompt the user for
instructions.
If the user click OK then the make table quesry is run, if the user clicks
cancel I would like the routine to stop!
Could some one please take a look at the code below and tell me why I cannot
make the vbOkCal buttons work.
Private Sub MakeTable_Click()
MsgBox "Select Batch will create a new batch of labels ready to print,
this overwrites all previous batch labels created. Do you want to
continue?", vbOKCancel, "Batch Print Selection"
If vbCancel Then
exit sub
else
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryMakeBatch"
End If
End sub
Regards
John