S
sue gray
I have a form that I check for these 2 fields to be complete beforeupdate. I
also want to give the user the chance to verify they want to save the record.
If the user hits save and the counselorsignature is blank it tells them its
required and then I get a MS Access error box that pops up (You can't save
this record at this time!
Registrations may have encountered an error while trying to save a record.
If you close this object now, the data changes you made will be lost.
Do you want to close the database object anyway?
YES / NO)
How do I get rid of the MS error. THanks for the help.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me!CounselorSignature) Then
MsgBox "You must sign Contact Note", vbOKOnly
Cancel = True
Me!CounselorSignature.SetFocus
Else
If IsNull(Me!counselorsigndate) Then
MsgBox "You must date Contact Note", vbOKOnly
Cancel = True
Me!counselorsigndate.SetFocus
Else
If MsgBox("Do You Want To Save", vbYesNo) = vbNo Then
Cancel = True
End If
End If
End If
End Sub
also want to give the user the chance to verify they want to save the record.
If the user hits save and the counselorsignature is blank it tells them its
required and then I get a MS Access error box that pops up (You can't save
this record at this time!
Registrations may have encountered an error while trying to save a record.
If you close this object now, the data changes you made will be lost.
Do you want to close the database object anyway?
YES / NO)
How do I get rid of the MS error. THanks for the help.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me!CounselorSignature) Then
MsgBox "You must sign Contact Note", vbOKOnly
Cancel = True
Me!CounselorSignature.SetFocus
Else
If IsNull(Me!counselorsigndate) Then
MsgBox "You must date Contact Note", vbOKOnly
Cancel = True
Me!counselorsigndate.SetFocus
Else
If MsgBox("Do You Want To Save", vbYesNo) = vbNo Then
Cancel = True
End If
End If
End If
End Sub