Setting Focus

G

Guest

I have a form with about 15 subforms for which I have used tabs. I have to
enter a lot of information in each tab, but when I click on the tab the
cursor isn't always in the first field, which is where I want it to be.

Can you tell me how I set the focus to the first field when the tab is
clicked?

I am not too knowledgeable about code, so if you provide some, can you tell
me where I have to fill in my own information and which propery field it goes
into?

Thanks much!
 
G

Guest

Unless you want the focue to be anywhere other than the first tab on the
subform you don't need to "set Focus". Simple open the forms in design view
and set the fist field (the one that you want it to open with as the focus)
as Tab Index 0. You will find this on Properties - Other.
 
M

manningfan

Tanya -
Go to the Properties and set the Tab Index of the first field to "0"
(without the quotes). You will want to order the rest of the fields as
well, so go to each successive field and set the Tab Index to 1 higher
than the previous field.

It's always a good idea to do this on every form because it controls
how the user moves through the screen.
 
G

Guest

Thank you both - that worked perfectly!!!

Follow-up question though...my subforms are all in datasheet format because
I have to enter a lot of records in each one. The cursor is now in the first
field, however if there are any records, I still have to click because I need
to now place my cursor in the first blank field.........I know this changes
things...any ideas on how to do this when using datasheet format?

Thanks again.
 
M

manningfan

You can open the form to a new record so the cursor is there already if
you want. I think you just need to set the Data Entry property of the
form to "Yes".

You can also try using DoCmd.GoToRecord , , acNewRec
 
G

Guest

Thanks a lot!

You can open the form to a new record so the cursor is there already if
you want. I think you just need to set the Data Entry property of the
form to "Yes".

You can also try using DoCmd.GoToRecord , , acNewRec
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top