subform tab order problem

G

Guest

The first field in my sub-form is a short-date field. The input mask for
this field is set at the form level, not the table level. If I enter data in
that field and hit the tab button, the cursor jumps to field 2 (like I want
it to), but then immediately jumps back into the first field, highlighting
the value. If I hit Tab again, it goes to field 2 again without issue. Has
anybody experienced this before?

I thought it might have something to do with the input mask, because when I
highlight the first field (short date field), a template of __/__/____ is
automatically put in. I enter 0-5-0-5-2-0-0-6, hit tab, the field is
shortened to 5/5/2006 while the cursor goes to field 2, but then cursor
immediately comes back into the first field and highlights the value 5/5/2006.

It seems to jump back to whatever field I have as tab order 0 .

Thanks for any help.
 
B

Bill Mosca, MS Access MVP

Mark

That is indeed strange. Could it be that there is soem code for the second
text box that is forcing the focus back on the first box? Look at the events
for text box 2 in the properties box. It would most likely be the GotFocus
or Enter event.
 
G

Guest

Hey Bill,
No events in either one. I have toggled the tab properties and nothing
seems to work. A little more background; The data for the subform comes
from a master table, while the data for the master form comes from a query.
The linked field between the sub and master form is EmpID. When the master
form is opened, tab order goes through the master form fields and command
buttons then jumps into the subform field that is giving me a problem.
 
B

Bill Mosca, MS Access MVP

Mark

I've never seen this happen. What happens if you set text1's AutoTab to Yes?
Once the whole date is entered the cursor should automatically tab to the
next tabstop. I don't know if that will stop the ping pong effect, but it
might.
 
G

Guest

It is very strange. I deleted my whole subform in hopes of starting over.
I will try your suggestion and see what happens. Be with you shortly.
 
G

Guest

Nope, didn't work. Still doing the same thing.

What happens is the user will start in one form, select an employee, click a
button and be directed to a data entry form. The subform on that data entry
form is where they are supposed to enter data.

I think what I'm going to have to do is build everything from the master
table. The starting form is based on a query, but the data form is based on
the master table, so I think I'm just going to simplify everything and base
all forms, etc. on that on master table, without any queries at all.
Hopefully, that will eliminate the need to even have a subform. It will be
tomorrow, but I will let you know how it goes.

Thanks for taking the time!
 

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