Setting the focus

Robert C

Registered User.
Local time
Today, 14:43
Joined
Mar 27, 2000
Messages
88
How can I ensure that a particular field on a form has the focus when the form is opened?

Thank you.
 
Set the tab number for that field to zero.

Hope it helps,
Peter Paul
 
What Peter suggests will not work if you have the Tab Stop of the control set to No. What you need to do is use the On Open event of your form:

Private Sub Form_Open(Cancel As Integer)
YourControlName.SetFocus
End Sub

Change YourControlName to the name of the control you wish to receive the focus.

HTH
RDH

[This message has been edited by R. Hicks (edited 04-14-2000).]

[This message has been edited by R. Hicks (edited 04-14-2000).]
 

Users who are viewing this thread

Back
Top Bottom