Do anybody knows why this generates a #5 error??
Private Sub Form_Load()
Me.Text1.SetFocus
End Sub
Julio Borges
Rio de Janeiro - Brazil
[email protected]
Printable View
Do anybody knows why this generates a #5 error??
Private Sub Form_Load()
Me.Text1.SetFocus
End Sub
Julio Borges
Rio de Janeiro - Brazil
[email protected]
Private Sub Form_Activate()
Command1(1).SetFocus 'will work
End Sub
Private Sub Form_Load()
Command1(1).SetFocus ' will not work
End Sub
I think setfocus is not the stuff of load events. Activate, which fires automatically after the laod event, does like setfocus though.
Phil
If you want it in the load event, then you must place a Me.Show before calling Text1.Setfocus.
Thanks a lot. It worked fine.
Julio Borges
Rio de Janeiro - Brazil
[email protected]