C
C J Squibb
I'm doing some data validation in an Access form and display a messag
listing any required fields that have been left blank.
The code segment ends with:
If strMissingFields > "" Then
' Missing field(s) - display the message
Msgbox ("Please enter all the required fields. The followin
are missing:" _
& vbCrLf & vbCrLf & strMissingFields)
Cancel = True
' This SHOULD cancel the BeforeUpdate event and return to th
form.
End If
This is supposed to cancel the BeforeUpdate event, and return the use
to the form to fill in the missing fields. However, I get a dialog bo
saying "You can't save the record at this time. (Database name
Database 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?"
The form's Error event fires just before this, but when I put in
message box to give me the error number and description, it just say
Error 0.
Help!
Clair
listing any required fields that have been left blank.
The code segment ends with:
If strMissingFields > "" Then
' Missing field(s) - display the message
Msgbox ("Please enter all the required fields. The followin
are missing:" _
& vbCrLf & vbCrLf & strMissingFields)
Cancel = True
' This SHOULD cancel the BeforeUpdate event and return to th
form.
End If
This is supposed to cancel the BeforeUpdate event, and return the use
to the form to fill in the missing fields. However, I get a dialog bo
saying "You can't save the record at this time. (Database name
Database 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?"
The form's Error event fires just before this, but when I put in
message box to give me the error number and description, it just say
Error 0.
Help!
Clair