Hi
I have the following code in the BeforeUpdate event of my form :
Private Sub Form_BeforeUpdate(Cancel As Integer)
MsgBox "Before Saving"
'Preview Button on form not clicked
If GlobalLoginInd <> 1 Then
MsgBox "Save aborted"
DoCmd.SetWarnings False
Cancel = True
End If
End Sub
When I close the form usign the 'X' button , the OnError event gets activated ,showing err.number 0 and no description and gives me the following error :
You can't save this record at this time.
<application name> 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 ?.
Any ideas as to why this happens?
Thanks,
Gina
I have the following code in the BeforeUpdate event of my form :
Private Sub Form_BeforeUpdate(Cancel As Integer)
MsgBox "Before Saving"
'Preview Button on form not clicked
If GlobalLoginInd <> 1 Then
MsgBox "Save aborted"
DoCmd.SetWarnings False
Cancel = True
End If
End Sub
When I close the form usign the 'X' button , the OnError event gets activated ,showing err.number 0 and no description and gives me the following error :
You can't save this record at this time.
<application name> 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 ?.
Any ideas as to why this happens?
Thanks,
Gina