# Database Discussions > Microsoft Access >  Field on Form won't stay onFocus

## egrogg

hello,

I have been trying to run this code:

Private Sub FName_Exit(Cancel As Integer)

If IsNull(Me!FName) Then
MsgBox "Eh...fill this in!"
Me.FName.SetFocus
End If

End Sub


But every time it changes to the next field on the form on Access 2007

I can't seem to get it to stay on that field.

Any help?

Ernest

----------


## Allan Murphy

Set focus to another field then move back to FName

----------

