M
Mark A. Sam
Hello,
In a textbox of a continuous subform I have this code in the BeforeUpdate
event:
Private Sub EmailAdddress_BeforeUpdate(Cancel As Integer)
On Error GoTo errSec
If GetUserLevel() <> "admin" Then
Cancel = True
MsgBox "Only an Administrator can change email addresses from this form!"
Me.Undo
End If
exitSec:
Exit Sub
errSec:
MsgBox "Error " & Err & ": " & Err.Description
Resume Next
End Sub
When this runs and the user is not "admin" I get a message box which says,
"No current record." w/o quotes and no err number. The problem is the undo
method. I have tried, DoCmd.RunCommand acCmdUndo and [EmailAdddress].Undo
with the same result. This is an A2002 mdb database, opened with A2007.
Thanks for any help and God Bless,
Mark A. Sam
In a textbox of a continuous subform I have this code in the BeforeUpdate
event:
Private Sub EmailAdddress_BeforeUpdate(Cancel As Integer)
On Error GoTo errSec
If GetUserLevel() <> "admin" Then
Cancel = True
MsgBox "Only an Administrator can change email addresses from this form!"
Me.Undo
End If
exitSec:
Exit Sub
errSec:
MsgBox "Error " & Err & ": " & Err.Description
Resume Next
End Sub
When this runs and the user is not "admin" I get a message box which says,
"No current record." w/o quotes and no err number. The problem is the undo
method. I have tried, DoCmd.RunCommand acCmdUndo and [EmailAdddress].Undo
with the same result. This is an A2002 mdb database, opened with A2007.
Thanks for any help and God Bless,
Mark A. Sam