G
Guest
I am currently designing a Reciept Database. The main form has a button that
automatically inserts the next reciept number which is located in a seperate
table. I am wanting to put in a Warning Message to display when a user
clicks the Add Reciept Button to prevent users from accidently clicking the
Add Reciept Button and using up a number. Below is the code I am using for
the Add Receipt Number Button:
rivate Sub Command14_Click() 'insert invoice header button
Dim strWk As String
Dim lOrderNo As Long 'to hold the returned returncode/gen'ed
number
strWk = "INSERT INTO tblOrders(RctNbr) VALUES (xGenNxtNbr());"
lOrderNo = xGenNxtNbr(strWk, "tblOrders", "RctNbr") 'x will be 0 or the
generated order number
Me.Reciept_Number = lOrderNo 'show rc or
nbr to user
End Sub
Is it possible to create a Yes, No (Or Yes/No/Cancel) Message so that if a
user accidently pressed the button there is the option for them to click No
and cancel the execution of the code, and if they click yes, for the process
to resume? I don't know much about VB so any help would be greatly
appreciated. Thankyou.
automatically inserts the next reciept number which is located in a seperate
table. I am wanting to put in a Warning Message to display when a user
clicks the Add Reciept Button to prevent users from accidently clicking the
Add Reciept Button and using up a number. Below is the code I am using for
the Add Receipt Number Button:
rivate Sub Command14_Click() 'insert invoice header button
Dim strWk As String
Dim lOrderNo As Long 'to hold the returned returncode/gen'ed
number
strWk = "INSERT INTO tblOrders(RctNbr) VALUES (xGenNxtNbr());"
lOrderNo = xGenNxtNbr(strWk, "tblOrders", "RctNbr") 'x will be 0 or the
generated order number
Me.Reciept_Number = lOrderNo 'show rc or
nbr to user
End Sub
Is it possible to create a Yes, No (Or Yes/No/Cancel) Message so that if a
user accidently pressed the button there is the option for them to click No
and cancel the execution of the code, and if they click yes, for the process
to resume? I don't know much about VB so any help would be greatly
appreciated. Thankyou.