Lin said:
Hi Dirk thanks for that. Here's my sample:
On form I have these fields; Surname1/Surname2/Surname3/GivenName
If surname1 is filled, fine I go to Surname2 but if I have no name to
insert at Surname2 then I want to got directly to GivenName.
Any situation where you have field names with sequential numbers, such
as "Surname1", "Surname2", etc., probably would be better solved by a
related table wherein each of those fields is actually a new record.
Then there would be a subform to show those records.
However, the simple answer to what you are trying to do is probably to
use an Exit event like this:
'----- start of example code -----
Private Sub Surname2_Exit(Cancel As Integer)
If IsNull(Me!Surname2) Then
Me!GivenName.SetFocus
End If
End Sub
'----- end of example code -----