Bound Form - tab key scrolls through records

G

Guest

Hello,

I'm using Access 2003. I have a form bound to a table. I have a Tab
Control set up on the form, and on each Tab Page, there are various fields
bound to the table.

The table has 1,000s of records. I have a combobox in the form's header
that is pre-populated with a field from my table (name). So if I use the
combobox to select a name, all of the controls on all of the tabs advance to
the particular record associated with that particular name. This is all
working nicely.

Now here is my issue. On any of the Tab Pages, if I hit the <TAB> button
(not to be confused with the Tab Control....<TAB> meaning the <TAB> button on
the keyboard) enough times, my form advances to the next record. Here is how:

Let's say I have 3 TextBox controls on one of my Tab Pages - Name,
Occupation, and Age. My Tab Page sets focus to Name when the page is active.
If I hit <TAB> twice, it jumpst from Name->Occupation, then from
Occupation->Age, all for the same record. Now if I hit <TAB> a third time,
it moves back to Name, and advances to the NEXT RECORD.

This same behavior holds true for any of my Tab Pages. If I hit <TAB> while
on the last control in my Tab Order, it advances to the next record.

I would like the only way to advance to the next record to be by using the
combobox and picking a new record there.

OK Wait - While typing this (as is often the case) I found a property called
Cycle and set it to Current Record. It was previously set to All Records.
This seemed to solve my problem.

Any thoughts on this anyway? There was also a Current Page setting...what
would that indicate?

Thanks for reading...any thoughts on this still appreciated.

Scott
 
D

Douglas J. Steele

You need to put code in the LostFocus event of the last control on the tab
(Age in your example) to set focus to the first control on the next tab.
 

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