Solved

How do I navigate automatically without using the tab key

Posted on 2009-05-14
14
689 Views
Last Modified: 2013-11-28
I have a VBA application where I need to navigate from one field after the data is entered to another field automatically without using the tab key or the mouse ... help is greatly appreciated...! I tried with afterupdate trigger but not working and below is the code and also
exit trigger

Thanks
Radhs
Private Sub txtPartno_afterupdate()
 If Me.txtPartno.Value <> "" Then
      Me.txtLotNo.SetFocus
 End If
End Sub
=========
Private Sub txtPartno_Exit(Cancel As Integer)
If Me.txtPartno.Value <> "" Then
      Me.txtLotNo.SetFocus
   End If
End Sub

Open in new window

0
Comment
Question by:Radhs74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 4
  • +1
14 Comments
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 24388617
How are you going to signify the user is done typing?  

I know in asp .net you can use an alt + key combo to jump to the next field, but not sure about here.
0
 
LVL 7

Accepted Solution

by:
shambalad earned 250 total points
ID: 24388632
You can set the Form's AutoTab property to true.
From Access Help:
You can use the AutoTab property to specify whether an automatic tab occurs when the last character permitted by a text box control's input mask is entered. An automatic tab moves the focus to the next control in the form's tab order. Read/write Boolean
0
 

Author Comment

by:Radhs74
ID: 24388689
where is that property as I do not see when I go to properties of the form in ms-access
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 75
ID: 24388908
"properties of the form "

It's a property of Controls (text / combo box) ... on the 'Other' tab.

mx

0
 
LVL 75
ID: 24388914
btw .. no points for my comment.

mx
0
 

Author Comment

by:Radhs74
ID: 24389077
The problem i have is the user can enter any kind of value that would be a combination
of characters, numbers and hyphen .... so kind of getting issues with the input mask and
also the length is an issue ... dont know what the user might enter in that field
i checked with autotab property it is automatically navigating but the above are the issues

Thanks
Radhs
0
 
LVL 75
ID: 24389145
I think the auto tab is only going to be useful where a field as a fixed number of characters ... and ... all of those are required.

mx
0
 
LVL 7

Expert Comment

by:shambalad
ID: 24390259
Sorry, out of the office for a few hours...
Thanks for the back-up mx, I think you should at least get an assist for this one.
Todd
0
 
LVL 7

Expert Comment

by:shambalad
ID: 24404233
Radhs -
There's going to have to be some sort of a trigger in order for the application to know when to set the focus to the next control. Is there a particuar character(s), like a period, letter, number of space, that are added at the end of the field? Is it just the tab key that you cannot use, or is there another reason you need this way to automatically move to the next control?
Todd
0
 

Author Comment

by:Radhs74
ID: 24406755
Yeah I think any user who does the data entry should atleast use tab of use the mouse to navigate to the next field ... but I think these users are a lot lazy that they cannot do this ...they want everything automatically do for them when they sit in the chair to do the work!
they just want to enter values but cannot use mouse or the tab key ... mey be it takes up a lot of energy for them to do .. which they dont want to burn it up!

thanks
radhs
0
 
LVL 7

Expert Comment

by:shambalad
ID: 24406925
radhs -
One of a developer's more important tasks is to manage user expectations. To this end, I am sometimes pulled into brainstorming sessions where my role is to tell the others which of their ideas is feasible or not from a technical standpoint. In the case of a request like the one your users are making, I would have to give an emphatic 'impossible'; at least until someone comes out with a computer that can read minds.
Good luck,
Todd
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 250 total points
ID: 24407135
I can guarantee you that in the real world of data entry, using a mouse slows down entry.  Any form used mainly for data entry should 100% navigational by keyboard.

mx
0
 

Author Comment

by:Radhs74
ID: 24411913
Ok I accept  that ... thanks!

Radhs
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question