I am getting a confusing message with this. I have a field that is a combobox on the form. I want to, under certain conditions, "undo" what the user has done (you will see what I mean in the code). When I run this, I get the following error message:
RunTime 2115: The Macro or Function set to the BeforeUpdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field
Here is the code. Thanks for your help.
[This message has been edited by shacket (edited 09-19-2001).]
RunTime 2115: The Macro or Function set to the BeforeUpdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field
Here is the code. Thanks for your help.
Code:
If Me.Combo52 = "Member" Then
'Double check that they meant to make this person a member before
'you record a membership date for them
Response = MsgBox("You have changed " & Me.First & "'s membership type from " & Me.Combo52.OldValue & " to Member. Confirm " & _
"this by clicking YES below." & Chr(13) & "If this is not your intention, click NO.", 0 + 4 + 256, "Changed to Member?")
If Response = vbYes Then
If Nz(Me.MembershipYear) = "" Then
Me.MembershipYear = Date
End If
Else
Me.Combo52.Value = Me.Combo52.OldValue '<<<<This is the code causing the error
Me.Refresh
Exit Sub
End If
End If
[This message has been edited by shacket (edited 09-19-2001).]