setfocus on newrecord or nextrecord

superrob5

Registered User.
Local time
Today, 23:34
Joined
May 8, 2003
Messages
99
when I click on the ado control on the form I want to be able to set the focus to the first field. I know how to use setfocus but I dont know where to put the code.?????




Thanks in advance.
 
you could ask in the form's current event if the pointer is in a new record
Code:
Private Sub Form_Current()
  If Me.NewRecord Then
    Me!YourControl.SetFocus
  End If
End Sub
 
thank you
 

Users who are viewing this thread

Back
Top Bottom