Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2008
    Posts
    3

    Unanswered: Automatically add new record when field reached 6 characters

    Ok so I have not even opened Access in over a year, I am using 2007 and just need a VERY simple way of keeping track of barcode numbers for a product. I have 2 fields ID (auto number) and Barcode. There will only be 6 characters in a barcode and could be a combo of letters and numbers

    Setting the field size to 6 is easy enough, but I want to have it automatically add a new record every time the field reaches 6 (this way I can just scan without having to worry about hitting the Save or tapping enter.

    Thank you for the time in reading and replying i appreciate it!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    If you're keying in the data, then look at the OnKey* events
    George
    Home | Blog

  3. #3
    Join Date
    Jul 2008
    Posts
    3
    Quote Originally Posted by georgev
    If you're keying in the data, then look at the OnKey* events
    Well i am using a barcode scanner, but it uses the keyboard PS/2 connection.
    How would I get the OnKey event to update on the 6th character entered in the field?

    All the barcodes have 6 and only 6 characters, so the field size is set to 6.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    if you are reading from a barcode scanner then usually they act as if the data was keyed in
    so have a look at the onkey events..
    if the length of the data =6 then call an update event.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jul 2008
    Posts
    3
    Quote Originally Posted by healdem
    if you are reading from a barcode scanner then usually they act as if the data was keyed in
    so have a look at the onkey events..
    if the length of the data =6 then call an update event.
    Yes it does work just as if it was keyed. I see onkey up onkey down and onkey press, then I don't really know what to do. How do I build an update event for this....? It seems so easy in theory

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    well why not try placing some code in the events find out which ones may be usefull.

    BTW it may be better to look at the controls on change event.

    the help system should point you in the right way.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •