Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

focus on field when entering data 1

Status
Not open for further replies.

jewel

Technical User
May 23, 2001
158
NZ
hi all

I have a form based on a table for data entry

4 fields

name
position
monthid
year

After keying data into each field - enter on last field
brings up an new record and focus is in name ready to enter data again

how do put the focus on the name field please

thanks
Dianne
 
Hello Dianne,

Open the form in Design view.
Set the form's Cycle property to Current Record.

Regards
Daniel
 
thanks Daniel

but that doesn't seem to have made any difference? not sure what I am doing wrong. Any other ideas?
 
Go to your form's property box. Select "Events"; click on "OnCurrent". Select "Build Code". The sub "Private Sub Form_Current()" should come up. In this sub type in

YourName.SetFocus

where "YourName" is the actual name of your text box.

Hope this helps.

The Missinglinq

"It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
the Missinglinq

thank you that worked just fine!

Dianne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top