Can someone explain this behavior in the Entering event?

Can some explain to me the behavior I’m seeing with this Entering event code. I’m simply trying to prevent access to this field if the value of isgkpr is false. It’s a checkbox field. It works fine if I try to click the checkbox, click away somewhere on the form, then try again… each time I get my “You are not a GateKeeper” message… but if i click once I’ll get the message, but if I click again (w/o clicking somewhere else first)if allows the click to check the box.

Sub Entering(Source As Field)

Dim session As New NotesSession		Dim ws As New NotesUIWorkspace		Dim uidoc As  NotesUIDocument		Dim db As NotesDatabase		

Dim udoc As NotesDocument



Set db=session.CurrentDatabase

Set uidoc = ws.Currentdocument

Set udoc=uidoc.Document



If Not(udoc.isgkpr(0)) Then

	Messagebox "You are not a Gatekeeper.... you cannot work in this section..."

	Continue = False

End If

End Sub

Do I have to “exit” the field to have it “reset” the event?

Thanx…

Subject: Can someone explain this behavior in the Entering event?

The Entering event does not have a property that allows You to set “Continue = False” to prevent further work with the field, like the QueryClose event has. This means that You must manually move the focus away from the field in order to reset the Entering event.

So, instead of writing “Continue = False” in Your code above You should write

Call uidoc.GotoNextField

hth

Subject: RE: Can someone explain this behavior in the Entering event?

perfect… thanx for your help…