
December 11th, 2003, 09:20 AM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 13
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
using vbOk and vbCancel in access
I have a message box with the Ok and Cancel buttons present, Ok being the default.
If OK is selected, the database prints a page. If cancel is selected the database reverts back to the original form. My code below:-
MsgBox "Place defective Item and NCR Docket on you're relevant quarantine area - OK to continue" _
, vbOKCancel + vbDefaultButton1 + vbInformation, "Deficiency Entered"
If Click = vbOK Then
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.OpenForm "NCR Reporting2", acNormal, "", "", , acNormal
DoCmd.Close acReport, "Scrap Ident Docket"
Else
If Click = vbCancel Then
DoCmd.Close acReport, "Scrap Ident Docket"
DoCmd.OpenForm "NCR Report3", acNormal, "", "", , acNormal
How can I get the buttons to react in the correct manner???
|