GoToControl on record load (1 Viewer)

andymac

Registered User.
Local time
Today, 06:16
Joined
Jun 2, 2013
Messages
36
Hello,

I'm using a barcode scanner to enter ID numbers into a combo box on a form.. I've got it to do this much - scan the barcode, and then the form loads the relevant record. Great - now I want, that when a barcode is scanned, it makes the next field the 'live' field (the one with the cursor in it).

Hope that makes sense

Andrew
 

John Big Booty

AWF VIP
Local time
Today, 15:16
Joined
Aug 29, 2005
Messages
8,263
Try adding the following to your code;
Code:
Me.YourControlName.[URL="http://msdn.microsoft.com/en-us/library/office/aa205181%28v=office.10%29.aspx"]SetFocus[/URL]
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 22:16
Joined
Aug 30, 2003
Messages
36,127
Use SetFocus. If you're using VBA

Me.TextboxName.SetFocus
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 22:16
Joined
Aug 30, 2003
Messages
36,127
This is what happens when the phone rings while typing. :p
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 06:16
Joined
Jul 9, 2003
Messages
16,287
In the booklet that comes with your barcode scanner you will find some barcodes with instructions on how to use them. Basically you need your barcode scanner to send to the combo box the list of numbers/characters scanned followed by the enter key.

One of the setup option codes in the booklet will be an instruction to set the barcode scanner to first transmit the string of contents of the barcode followed by the enter key. The enter key command will then move your cursor to the next control on your form as identified in the tab order of the form.
 

Users who are viewing this thread

Top Bottom