Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic "enter" in Access 2000

Status
Not open for further replies.

ffemt1

Technical User
May 12, 2004
5
US
At the end of an assembly line, I am currently tracking parts using 2 pieces of bar-coded information, part number and serial number for each piece. We currently have a Symbol LS 1902F scanner reading the information into an Excel spread sheet. After one barcode is read, we have to press "tab", then read the other barcode, then press enter which returns the curser to the next line. This is very labor intensive, and does not really allow us to check for unique serial numbers.

I have a fairly simple database in Access with the fields "part number", "serial number", "date" and "time". The first 2 are input using the barcode reader, and the date and time are automatically enter.

My question is how do you have software read a barcode, automatically advance to the next field?

The part number and serial number both vary in length and format so i do not think I can use a format mask which I think allowes me to use the autotab function.

Here are actual numbers:

part #
KFCEH0401N03
EHK05AKN1
MKFCEH1201D08

Serial # (always the same length)
S1704V04369
SV042006161

Any ideas?
 
'Maybe this will work for you...
'Assuming your first scan is reading to col A and the '2nd 'reading to col B...edit to suit


Private Sub Worksheet_Change(ByVal Target As Range)

rb = Range("b:b").End(xlDown).Row
ra = Range("a:a").End(xlDown).Row
Select Case ra - rb
Case Is > 0
MsgBox ("missed scan in column B, select cell and re scan."), vbCritical
Exit Sub
Case Is < 0
MsgBox ("missed scan in column A, select cell and re scan."), vbCritical
Exit Sub
Case Else
End Select

If ActiveCell.Column = 1 Then
Cells(ActiveCell.Row, ActiveCell.Column + 1).Select
Else
Cells(Range("a:a").End(xlDown).Row + 1, 1).Select
End If

End Sub
 
...Hmmm, I just noticed that you Ref. Access in your thread title and then Eexcel in you description,...this code is for Excel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top