Input multiple scanned values

C

CJ

Hi Groupies

My client uses a scanner to read inventory codes when moving items into
trucks. This works fine with no set up or code required however after
scanning each item, the user must push an on screen button before they can
scan the next item.

The scanned item populates a text box, a query runs and the correct
inventory item is listed in an "Shop Inventory" listbox. The user must then
push an arrow button to have the item move to the "Truck Inventory" listbox.

Is there a way to have Access 2007 automate this process so that scanned
items continue to populate the Shop Inventory listbox so that they only have
to push the button once to move everything over to Truck Inventory?
 
B

Barry A&P

CJ
Not much detail in your post on how all this happens..

barcode readers are basically a keyboard that types what they scan and then
hits enter..

i am assuming the scanning happens into a textbox on an access form, on the
form the button runs the Update query to set the item in the truck inventory
table. you could use the combos after update event to run the query, clear
the combo, then set the focus back to the combo.


or you could scan them all into a temp table through a datasheet form then
usa a query to move the whole lot after they are confirmed. here is how i do
it

I am a newbie so please be take this code for what its worth..

Private Sub ButtonUpdate_Click()
On Error GoTo MyError_Handler
If MsgBox("Are you sure you want to move " & DCount("*", "T_TempScan") & "
Items To The " & DLookup("LocationName", "T_Locations", "LocationID = " &
Me!LocationNameCombo) & " Location", vbYesNo Or vbQuestion) = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunSQL ("UPDATE T_TempScan INNER JOIN T_SerialNumbers ON
T_TempScan.TempScan = T_SerialNumbers.SerialNumberID SET
T_SerialNumbers.locationID = Forms!F_Tami!LocationNameCombo"), dbFailOnError
MsgBox "Update Completed Successfully"
DoCmd.Requery "F_LocationContents"
If RadioPrintLabels = True Then
DoCmd.OpenReport "R_PartLabelsFromTamiDymo"
End If
DoCmd.RunSQL "DELETE T_TempScan.TempScanID, T_TempScan.TempScan FROM
T_TempScan"
'DoCmd.OpenReport "R_PartLabelsFromTamiDymo"
DoCmd.SetWarnings True
DoCmd.Requery "F_TempScanSub"
Me!PNIDCombo = Null
Me!PNIDCombo.SetFocus
Else
End If
ButtonUpdate_Exit:
Exit Sub
MyError_Handler:
MsgBox "Update Failed" & vbNewLine & "With Error " & Err.Number & " - " &
Err.Description
GoTo ButtonUpdate_Exit
End Sub


Backup Everything

Barry
 
C

CJ

Hi Barry

Thanks for popping in and supplying your code...not my forte.

I had thought of scanning into a table but I wasn't sure how to write the
code.
I will give it a try.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Barry A&P said:
CJ
Not much detail in your post on how all this happens..

barcode readers are basically a keyboard that types what they scan and
then
hits enter..

i am assuming the scanning happens into a textbox on an access form, on
the
form the button runs the Update query to set the item in the truck
inventory
table. you could use the combos after update event to run the query, clear
the combo, then set the focus back to the combo.


or you could scan them all into a temp table through a datasheet form then
usa a query to move the whole lot after they are confirmed. here is how i
do
it

I am a newbie so please be take this code for what its worth..

Private Sub ButtonUpdate_Click()
On Error GoTo MyError_Handler
If MsgBox("Are you sure you want to move " & DCount("*", "T_TempScan") & "
Items To The " & DLookup("LocationName", "T_Locations", "LocationID = " &
Me!LocationNameCombo) & " Location", vbYesNo Or vbQuestion) = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunSQL ("UPDATE T_TempScan INNER JOIN T_SerialNumbers ON
T_TempScan.TempScan = T_SerialNumbers.SerialNumberID SET
T_SerialNumbers.locationID = Forms!F_Tami!LocationNameCombo"),
dbFailOnError
MsgBox "Update Completed Successfully"
DoCmd.Requery "F_LocationContents"
If RadioPrintLabels = True Then
DoCmd.OpenReport "R_PartLabelsFromTamiDymo"
End If
DoCmd.RunSQL "DELETE T_TempScan.TempScanID, T_TempScan.TempScan FROM
T_TempScan"
'DoCmd.OpenReport "R_PartLabelsFromTamiDymo"
DoCmd.SetWarnings True
DoCmd.Requery "F_TempScanSub"
Me!PNIDCombo = Null
Me!PNIDCombo.SetFocus
Else
End If
ButtonUpdate_Exit:
Exit Sub
MyError_Handler:
MsgBox "Update Failed" & vbNewLine & "With Error " & Err.Number & " - " &
Err.Description
GoTo ButtonUpdate_Exit
End Sub


Backup Everything

Barry
 
B

Barry A&P

CJ

Post a few more details about what you are hoping to do and we would be glad
to help..

Barry

CJ said:
Hi Barry

Thanks for popping in and supplying your code...not my forte.

I had thought of scanning into a table but I wasn't sure how to write the
code.
I will give it a try.

--
Thanks for taking the time!

CJ
---------------------------------------------------------
Know thyself, know thy limits....know thy newsgroups!
Barry A&P said:
CJ
Not much detail in your post on how all this happens..

barcode readers are basically a keyboard that types what they scan and
then
hits enter..

i am assuming the scanning happens into a textbox on an access form, on
the
form the button runs the Update query to set the item in the truck
inventory
table. you could use the combos after update event to run the query, clear
the combo, then set the focus back to the combo.


or you could scan them all into a temp table through a datasheet form then
usa a query to move the whole lot after they are confirmed. here is how i
do
it

I am a newbie so please be take this code for what its worth..

Private Sub ButtonUpdate_Click()
On Error GoTo MyError_Handler
If MsgBox("Are you sure you want to move " & DCount("*", "T_TempScan") & "
Items To The " & DLookup("LocationName", "T_Locations", "LocationID = " &
Me!LocationNameCombo) & " Location", vbYesNo Or vbQuestion) = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunSQL ("UPDATE T_TempScan INNER JOIN T_SerialNumbers ON
T_TempScan.TempScan = T_SerialNumbers.SerialNumberID SET
T_SerialNumbers.locationID = Forms!F_Tami!LocationNameCombo"),
dbFailOnError
MsgBox "Update Completed Successfully"
DoCmd.Requery "F_LocationContents"
If RadioPrintLabels = True Then
DoCmd.OpenReport "R_PartLabelsFromTamiDymo"
End If
DoCmd.RunSQL "DELETE T_TempScan.TempScanID, T_TempScan.TempScan FROM
T_TempScan"
'DoCmd.OpenReport "R_PartLabelsFromTamiDymo"
DoCmd.SetWarnings True
DoCmd.Requery "F_TempScanSub"
Me!PNIDCombo = Null
Me!PNIDCombo.SetFocus
Else
End If
ButtonUpdate_Exit:
Exit Sub
MyError_Handler:
MsgBox "Update Failed" & vbNewLine & "With Error " & Err.Number & " - " &
Err.Description
GoTo ButtonUpdate_Exit
End Sub


Backup Everything

Barry
 

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