Solved

How do I navigate automatically without using the tab key

Posted on 2009-05-14
14
685 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
  • 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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 - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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 …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now