Scan Barcode and tab key


S

Soboths

Using Access 2003, I have a data entry form that will be using with wireless
barcode scanning. This form has 3 fields: PartNumber, SerialNumber, and
OrderNumber. I would like to set these 3 fields with an automatically moving
cursor to the next field as when data is scanned in without pressing enter or
tab key. This form is on the network for multiple computers. Due to the
difference in length of data being inputted, so therefore I can't have a fix
input mask to each field.
I have set below code on the On Change event for each field, but it doesn't
work
-------
Private Sub PartNumber_Change()
Dim ctrl As Control
Set ctrl = Me.ActiveControl
If Not (IsNull(Me.PartNumber)) Then
Me.SerialNumber.SetFocus
End If




End Sub

-------

Private Sub SerialNumber_Change()
Dim ctrl As Control
Set ctrl = Me.ActiveControl
If Not (IsNull(Me.SerialNumber)) Then
Me.OrderNumber.SetFocus
End If
End Sub
 
Ad

Advertisements

S

Steve

First set the tab order to what you want. Then look at putting the MoveNext
action in the AfterUpdate event of each field.

Steve
(e-mail address removed)
 
L

ldiaz

Hi, Soboths,
I have a wireless scanner LS3578, and I have many fields for data entry,
I did this way, maybe this will give you some ideas,

I did a subform with all datas I need for data entry and then
on form I inserted the subform
on the form I create a textbox where the barcode will receipt the info,
and on the after event you can write a code with condition "IF" to fill the
field that you want.


I hope this can help you.

LD
 
J

John W. Vinson

Using Access 2003, I have a data entry form that will be using with wireless
barcode scanning. This form has 3 fields: PartNumber, SerialNumber, and
OrderNumber. I would like to set these 3 fields with an automatically moving
cursor to the next field as when data is scanned in without pressing enter or
tab key. This form is on the network for multiple computers. Due to the
difference in length of data being inputted, so therefore I can't have a fix
input mask to each field.
I have set below code on the On Change event for each field, but it doesn't
work
-------
Private Sub PartNumber_Change()
Dim ctrl As Control
Set ctrl = Me.ActiveControl
If Not (IsNull(Me.PartNumber)) Then
Me.SerialNumber.SetFocus
End If

The Change event won't work: it fires at every character scanned or typed.

Most scanners have the option to tag on a trailing tab or <Enter> keystroke
after the barcode value; this would cause Access to setfocus to the next
control in the tab order. You might need to set the Cycle property of the form
to Same Record if the barcodes would cause a record to be saved prematurely.
 
S

Soboths

Hello LD,
Thanks for replying...
Your idea is good ...I will try that…but I have only 3 fields on the form
that I would like to keep it simple as data will be going to 1 table. Is
there any other ways?

Soboths
 
S

Soboths

Thank you all for helping me out....
As for John's suggestion ---- It will be impossible for me to program for
all the scanners that will be using. Majorities of them are old one… and also
this form will be using by multiple computers and different scanner types.
That's why I am looking for any possibilities to have a code enforced on the
field.

SobothS
 
Ad

Advertisements

J

John W. Vinson

Thank you all for helping me out....
As for John's suggestion ---- It will be impossible for me to program for
all the scanners that will be using. Majorities of them are old one… and also
this form will be using by multiple computers and different scanner types.
That's why I am looking for any possibilities to have a code enforced on the
field.

Someone with more experience with scanners than me will have to help, then. It
sounds like you want Access to detect that a complete entry has been made in a
field, without any preconceptions about what constitutes a complete entry, or
any external signal saying that the entry is complete. I cannot imagine any
way to do so, but maybe there is something that I haven't imagined!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top