Getting populated fields to automatically skip to the next field

D

Dramer

Hello,

I've got a working form and after entering data for each field, I press tab
and it skips to the next field which is working okay,

But,

I'd prefer it to automatically skip after I have entered the correct data
for each field without doing the above. Is there an easy way to accomplish
this without getting to detailed?

Also,

How can I make the Enter key work on the last field in the form? Right now,
I have to use the Tab key on the last field also to end the record.

Thanks for any help in advance.
 
J

Jeff Boyce

?You want Access to "know" what "correct data for each field" is? Access is
not very smart. You'll have to tell it what is "correct" and then tell it
what to do.

What happens now when you use the <Enter> key? What do you mean by "work"?

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
L

Linq Adams via AccessMonster.com

Access provides for this under certan conditions.

1) The field in question has to have an input mask that requires a certain
number of characters

2) In Properties - Other the AutoTab Property is set to Yes

If the Input Mask is set to LLLL and AutoTab is set to Yes, after entering
four letters, say Linq, Access will tab to the next tabstop
 
L

Linq Adams via AccessMonster.com

If you want to avoid the use an Input Mask, as many of us do, here's a hack
that will do the job. Of course, in order for Access to use this you still
have to have a fixed number of characters in the input.

Where X is the maximum length of the data in YourTextBoxName and
NameOfNextControl is the next control to gain focus.

Private Sub YourTextBoxName_Change()
If Len(Me.YourTextBoxName.Text) = X Then NameOfNextControl.SetFocus
End Sub
 

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