Making the cursor default to a form field

Rabbitoh

Registered User.
Local time
Today, 23:11
Joined
Jul 17, 2006
Messages
34
Does anyone kniow how to make the mouse cursor default to a specific field on a form when it opens so that you can start typing in it without having to click in it first
 
Search for "SetFocus" in VBA help.. they have a detailed write up on it
 
Well ... there are two ways you can do this. Once is to set your tab order (right click on the form in design mode and select tab order). When the form opens, it will automatically highlight the 1st control in the tab order sequence.

The second, as G37Sam said is to use the SetFocus method. On the Open event of the form, use Me.txtControlName.SetFocus.

HTH,
-dK
 
Since this is posted in the Excel forum, is this Excel or Access we're talking about here? There will be a difference in how it is handled depending upon the answer.
 
Good lordy ... thank goodness someone is sharp at this hour to keep my gray matter focused on the obvious.

Rabbitoh .. try: Cells(YourRow,YourColumn).Select

HTH,

-dK
 
excel...will be trying the other suggestions in due course
Thanx
 

Users who are viewing this thread

Back
Top Bottom