Problem with using KeyUp event for TextBox

usermj

Registered User.
Local time
Today, 19:13
Joined
Dec 12, 2004
Messages
39
Hi there,

Recently I'm designing a Data Entry interface, which contains more than 10 textbox (fields). Instead of asking users to move cursor manually after each data entry, I want the system can automatically move the cursor to the next textbox.

I tried to use keyUp Event set for each textbox. It did work but not in the way as I expected. I only typed in one character in that textbox without finishing the whole word. The system has already moved cursor to next textbox.

How can I solve this problem?

or is there any other solution for automatically moving the cursor to the next textbox after filling the data for each textbox?

Many thanks
 
Last edited:
If your text box(es) that you want to use this with would hold the same length of data each time you could use the
Code:
Len(Me.MyTextBox.Text)
in code to tell it to set the focus to the next control. However, if the data can be of any length, then you will probably have to just let them tab through with the tab key.
 
Most systems are designed to move the cursor to the next field when the user presses the Tab or Enter key. Access by default does this if you have the Tab Order set in the order you want. Change the forms "Cycle" property to Current Record to prevent the user from jumping to the next record unless they click your navigation buttons.
 
How to prevent the Cursor move to next record?

Hi, ghudson:
I saw you name a lot on this Access forum. I really appreciated for you sharing your MA Access knowledge.
I just wondered base on the comments “Change the forms ‘Cycle’ property to Current Record to prevent the user from jumping to the next record unless they click your navigation buttons”. I have same problem, I only want show current record on current form. How can I prevent user move to next record by moving mouse? I already hide the navigation button, but the problem is user still can see other record in the table by using slip mouse down and up.

I appreciate for your help.

Thanks
 
AccessHope said:
How can I prevent user move to next record by moving mouse? I already hide the navigation button, but the problem is user still can see other record in the table by using slip mouse down and up.
Depends on why you want to prevent the mousewheel from moving through the recordset. I want my users to be able to use the mouse wheel to navigate through the records. I just have to proctect the user from moving to another record if the current record is dirty [modified but not saved] since Access will save a modified record when you move the focus to another record. These links should help you out...

A Better Mouse Trap?

Another mousewheel solution

Enable/Disable The Control Box X Button

Hide all Access Toolbars and Menubars

Audit Trail
 
Thank you for your response, because this form is “collection screen”. Avoid confusion, I want user only be able to see the current record without see others. I tried the link you provided at “Another mousewheel solution”. The code doesn’t work for me. I am trying to disable the form_MouseWheel event. Still haven’t find solution.

Thanks
 

Users who are viewing this thread

Back
Top Bottom