Solved

How do I navigate automatically without using the tab key

Posted on 2009-05-14
14
688 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

734 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