I am trying to figure out how to validate some data if a user chooses to save a record. On my form I have this as my before update event
My question is if the users says yes, how to I incorporate the validation below?
I have searched and can't seem to find a solution. I can get the validation to pop up when a field is missing, but instead of aborting the save, the incomplete record saves.
Also, I would like the form to remain open if a user chooses to save the record but no matter where I place this the form still closes
I don't understand what is happening on the yes event, and that is where my problem lies.
Thanks in advance,
Poco
Code:
If MsgBox("Would You Like To Save This New Record?", vbQuestion + vbYesNo + vbDefaultButton1, "Save This Record ???") = vbNo Then
Me.Undo
Code:
If IsNull(Me.Serial) Then
MsgBox "Please Scan a Serial Number!", vbOKOnly
Also, I would like the form to remain open if a user chooses to save the record but no matter where I place this the form still closes
Code:
DoCmd.OpenForm "frmWareIN", acNormal, "", "", , acNormal
Thanks in advance,
Poco
Last edited: