A
Associates
Hi,
In the form, before closing the form for inserting new record into a table,
Form_BeforeUpdate is called. I want to do some data validation to make sure
some important data are entered. So, i have if-else statement in the
Form_BeforeUpdate as follows
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim mesg, Title As String
Title = "Warning !!!"
If Me.Subject_Code <> "" Then
mesg = "Data has been changed in this record. Do you want to proceed?"
If MsgBox(mesg, vbYesNo, Title) = vbNo Then
Cancel = True
Me.Undo
End If
Else
MsgBox "Subject Code can not be empty", vbOKOnly
Cancel = True
...
End If
End Sub
My question is that instead of using "me.undo" to undo or reset the form, is
there any way of keeping the form and all the other data intact (not reset)
while giving the user to enter for the missing data for Access 03?
Thank you in advance
In the form, before closing the form for inserting new record into a table,
Form_BeforeUpdate is called. I want to do some data validation to make sure
some important data are entered. So, i have if-else statement in the
Form_BeforeUpdate as follows
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim mesg, Title As String
Title = "Warning !!!"
If Me.Subject_Code <> "" Then
mesg = "Data has been changed in this record. Do you want to proceed?"
If MsgBox(mesg, vbYesNo, Title) = vbNo Then
Cancel = True
Me.Undo
End If
Else
MsgBox "Subject Code can not be empty", vbOKOnly
Cancel = True
...
End If
End Sub
My question is that instead of using "me.undo" to undo or reset the form, is
there any way of keeping the form and all the other data intact (not reset)
while giving the user to enter for the missing data for Access 03?
Thank you in advance