J
JamesJ
I'm using the following code in the BeforeUpdate of the form
to confirm data changes:
Public Function ConfirmDataChange(Cancel As Integer)
Set frm = Screen.ActiveForm
Select Case MsgBox("Record(s) have been added or changed." _
& vbCrLf & "Save the Changes?", vbYesNo, "Record
Change")
Case vbYes 'go ahead and save.
frm.Requery
Case vbNo 'undo the changes.
Cancel = True
frm.Undo
End Select
End Function
I use the same code in several forms and have just added
the frm.Requery. Prior to adding this I wasn't getting an error.
Now I get the following error.
Run-time error '2115'
The Macro or Function set to the BeforeUpdate or ValidationRule
property for this field is preventing mydbname from saving data in the
field.
I have no idea which field it is refering to, and am assuming it is the
BeforeUpdate that is triggering this seeing I have nothing in the
ValidationRule form or table.
Any help will be appreciated,
James
to confirm data changes:
Public Function ConfirmDataChange(Cancel As Integer)
Set frm = Screen.ActiveForm
Select Case MsgBox("Record(s) have been added or changed." _
& vbCrLf & "Save the Changes?", vbYesNo, "Record
Change")
Case vbYes 'go ahead and save.
frm.Requery
Case vbNo 'undo the changes.
Cancel = True
frm.Undo
End Select
End Function
I use the same code in several forms and have just added
the frm.Requery. Prior to adding this I wasn't getting an error.
Now I get the following error.
Run-time error '2115'
The Macro or Function set to the BeforeUpdate or ValidationRule
property for this field is preventing mydbname from saving data in the
field.
I have no idea which field it is refering to, and am assuming it is the
BeforeUpdate that is triggering this seeing I have nothing in the
ValidationRule form or table.
Any help will be appreciated,
James