Setting focus to another field

miss_sunshine

Registered User.
Local time
Today, 12:06
Joined
Dec 13, 2004
Messages
17
On my data entry form, the ID (primary key) is shown, and its an auto number. I have shaded the text box differently to make it obvious to the user they don't have to enter a value into it. However, when the form is loaded the cursor starts in the ID field. I would like it to start in the next field, where data is to be added, but am not sure how to go about it.

I am currently using Access 2003.
 
Focus

Put the following code in the On Open Event of the form:

Me.YourField.SetFocus

Replace yourfield with the actual field name you want to set the focus on.
 
Focus

And it may not be necessary to show the ID Field on the form at all.
In properties, on the Format Tab you can set Visible to: NO.
That way you won't see it on the form but it is still there if you need for
relationship purposes. On the Data Tab you can also set Locked to: Yes
 
Just set the controls Enabled property to No on the forms Property Sheet
 

Users who are viewing this thread

Back
Top Bottom