none
Store data on every barcode click RRS feed

  • Question

  • I have a access database in which i have following fields

    Database name KOT

    Table Name MAIN

    id,Fields are No, Tank, Name_, Code

    Code is for barcode storing

    I have one more table STORE in which i have following fields

    id, Code,date 

    in this field i want to enter the barcode (whene ever a user shows his barcode in front of scanner his data to be entered and current date should also get entered in field date


    I am a System Administrator at Vadodara

    Saturday, August 22, 2015 5:25 PM

Answers

  • Barcode scanners typically act like keyboards. If you have a form with a textbox that has focus and you scan, the barcode appears in that field. You can then save it, empty the textbox and wait for the next scan. I would use a few lines of VBA, but you *may* be able to get away with binding the textbox to the field in the table and if the barcode scanner can be configured to hit Enter after scanning, and you have a Save button that responds to that, you *may* be able to do it without any coding. The current date/time can be set in table design by setting a Default Value for that field to:
    =Now()

    Note that your tables have field names that are Reserved Words. This is a very bad idea. Rename the fields No, Name, and Date. See http://allenbrowne.com/AppIssueBadWord.html for the complete list.


    -Tom. Microsoft Access MVP

    Saturday, August 22, 2015 6:16 PM
  • Sir, I got your point . I solved the date problem by putting =Now() in the default value as per your direction. As well as barcode field is concerned when i click the bar coder it take multiple lines i want only one bar code value in one click

    I am a System Administrator at Vadodara

    Sunday, August 23, 2015 5:37 PM

All replies

  • Usually, you would display a form to the users when they scan the barcode. If the form is bound to the table, then Access will automatically store the data. Otherwise, you can use code to do it.
    Saturday, August 22, 2015 5:59 PM
  • Barcode scanners typically act like keyboards. If you have a form with a textbox that has focus and you scan, the barcode appears in that field. You can then save it, empty the textbox and wait for the next scan. I would use a few lines of VBA, but you *may* be able to get away with binding the textbox to the field in the table and if the barcode scanner can be configured to hit Enter after scanning, and you have a Save button that responds to that, you *may* be able to do it without any coding. The current date/time can be set in table design by setting a Default Value for that field to:
    =Now()

    Note that your tables have field names that are Reserved Words. This is a very bad idea. Rename the fields No, Name, and Date. See http://allenbrowne.com/AppIssueBadWord.html for the complete list.


    -Tom. Microsoft Access MVP

    Saturday, August 22, 2015 6:16 PM
  • Without clicking the next button how wil it automatically save barcode into database

    I am a System Administrator at Vadodara

    Sunday, August 23, 2015 5:36 PM
  • Sir, I got your point . I solved the date problem by putting =Now() in the default value as per your direction. As well as barcode field is concerned when i click the bar coder it take multiple lines i want only one bar code value in one click

    I am a System Administrator at Vadodara

    Sunday, August 23, 2015 5:37 PM
  • >>>whene ever a user shows his barcode in front of scanner his data to be entered

    Do you mean that you get barcode data by the bar code scanner?

    >>>As well as barcode field is concerned when i click the bar coder it take multiple lines i want only one bar code value in one click

    Could you provide more information about how to get bar coder when you click the bar coder?

    As Tom van Stiphout and the DB guy have mentioned that if you have a form with a textbox that has focus and you scan, the barcode appears in that field.

    Tuesday, August 25, 2015 4:17 AM