SetFocus

MarkSJ

New member
Local time
Today, 18:29
Joined
Dec 21, 2010
Messages
3
G'day...I am new to this forum and access. I am using Access 2002. I have an equipment database that inputs barcodes using a barcode scanner. I want the focus to move to the next text box once I have scanned the barcode. I need to know what event I need to use. Many thanks in advance. MSJ
 
The barcode scanner most likely enters the data as if it was keyboard keystrokes. Is there a termination character that you can look for to know when the barcode is complete? If so, you might be able to use the keyup event.
 
And welcome to AWF.

welcome2awf_sm400.jpg
 
Alternatively, if it enters it all at once you could use the on change or after update properties.

Code:
Private Sub Txt_Textbox1_Change()
      txt_Textbox2.setfocus
End Sub

BTW

GREETINGS and WELCOME!!
 
Hi Mark

First of all you need to set the input mask on the barcode textbox. Specify the number of charactes of the barcode in the input mask and write the following line of code:
Code:
Private Sub Txtbarcode_change()
      txtnext.setfocus
End Sub

By specifying the input mask, when you scan the barcode in the textbox then the control automatically moves to next textbox.

I hopt it helps.
 

Users who are viewing this thread

Back
Top Bottom