473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Barcode reader and access form

Dear Friends,

i have a problem, tried lot of things, but here is the problem:

i have a form, called invoice. sold items would be inputted by an usb barcode scanner. Scanner works, i got the article number is inputted after hit scanner button.
But when i scan, the focus stays in the same field.


what i want to do is:

when you hit the scan button, it must tab to the next line to input the next product.
It also must check the second input. If the second input is the same as the first input, then the first line amount must
be increased with +1.

example: customer buys 3x cola and 2 fanta. then i will click 3 times to the scanner button and the selected first product line must on amount field 3. and when i scan the fanta, it must see the second different produuct and must automatically jump to the next( second ) line and if i hit button for second time to the fanta, then the amount of the second product line must be set to 2.

I need a workaround that detect automatically if the inputted product by barcodereader is the same? if yes, amount +1 if no automatic jump to second line.

Thats all, i know its not a big deal, but i cannot find.

any direction and or help is more then appreciated.

Thanks to all people in advance for replies...

sample code not working :

after update:

Expand|Select|Wrap|Line Numbers
  1. If (IsNull([aantall])) Then
  2. Me![Prijs] = Me![keuzelijst met invoervak39].Column(4)
  3. Me![OMschrijving] = Me![keuzelijst met invoervak39].Column(2)
  4. Me![BTW] = Me![keuzelijst met invoervak39].Column(3)
  5. Me![aantall] = "1"
  6. [OMschrijving].SetFocus
  7. [Keuzelijst_met_invoervak39].SetFocus
  8.  
  9.     ElseIf [Keuzelijst_met_invoervak39] = [Product-id] Then
  10.         Me![Prijs] = Me![keuzelijst met invoervak39].Column(4)
  11.         Me![OMschrijving] = Me![keuzelijst met invoervak39].Column(2)
  12.         Me![BTW] = Me![keuzelijst met invoervak39].Column(3)
  13.         Me![aantall] = ([aantall] + 1)
  14.         [OMschrijving].SetFocus
  15.         [Keuzelijst_met_invoervak39].SetFocus
  16.  
  17.             ElseIf [Keuzelijst_met_invoervak39] <> [Product-id] Then
  18.             'DoCmd.GoToControl "Subformulier Bondetail"
  19.             DoCmd.GoToRecord , , acNewRec
  20.             Me![Prijs] = Me![keuzelijst met invoervak39].Column(4)
  21.             Me![OMschrijving] = Me![keuzelijst met invoervak39].Column(2)
  22.             Me![BTW] = Me![keuzelijst met invoervak39].Column(3)
  23.             Me![aantall] = "1"
  24.             [OMschrijving].SetFocus
  25.             [Keuzelijst_met_invoervak39].SetFocus
  26.  
  27.     End If
  28.  
  29.  
  30. End Sub
Jun 9 '11 #1
1 3280
NeoPa
32,556 Expert Mod 16PB
I would suggest a slight redesign of the form.

Have the control which takes the barcode in the Header or Footer of the form. Every time a barcode is entered it checks for the existence of a record with the same code. If one is found it simply increments the quantity. If none is found it creates a new record for the code.

The focus would always be on the control for the barcode.

Does that make sense? It means items needn't always be entered in the correct order.
Jun 14 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Piotr Nowak | last post by:
Hi i need a script that will auto-submit a form when someone enters 11 characters into one of textfields.. any ideas? Thanks ;-) Peter
2
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. ...
5
by: Serdar C. | last post by:
hello everyone, i have a question about retrieving data from a bar code reader plugged in keyboard port (ps/2) i really dont know how to retrieve data from keyboard, i tried some methods but all i...
5
by: neilphan | last post by:
Hi all, I have an application that uses input from a barcode reader via a USB port. My application works fine only if the application HAS FOCUS. If the user opens up another application (not...
6
by: Samuel Shulman | last post by:
I would like to add barcode functionality to my POS program How does one attach barcode reader is it usually USB port How can the program get the data read by the device Thank you, Samuel
3
by: buddyr | last post by:
I am scanning a barcode into first textbox on a microsoft access form. When I scan barcode - the number does not appear in textbox. When I tab to next textbox - it appears. Is there a way to have it...
4
by: Joe | last post by:
is there any free barcode reader in vb8 for code-128 ??
1
by: syed asghar abbas | last post by:
I am Student of the BS(Cs) and i am student of the Final Term and my Final Project on the Barcode Reader that "How to Connect the Barcode Reader Device Scanner With Sql Database in C# 2005 "
1
by: likun12 | last post by:
i develope a barcode program from that barcode is generated.but i just dont know how to insert data into sqlserver from the barcode reader.
3
by: Erica Weems | last post by:
I have an Access form where the user will enter 20 serial numbers in text fields using a bar code reader. How can I check the form to make sure the same serial number hasn't been scanned more than...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.