Full Version: Populating portions of a form based on data entered in one field
UtterAccess Forums > Microsoft® Access > Access Forms
joshuamerritt
Hi all-
I've been working at this one for a while and can't decide on the best route to take from here.
I have a form, "frm_order_details", that is a datasheet I use to select the line items a customer has ordered. Each line item has an item name, a size, etc.
I would like to be able to use my barcode reader to scan a tag on the item that in turn retrieves the item name and size information and writes it to the table "tbl_order_details". I would like this to be a continuous loop, so that after each item is scanned, the form automatically goes to the next record in the datasheet to allow me to scan another item into their order.
No help needed with barcode scanner, I have had that long up and running with access. I just can't figure out if this is a dependant combo box, more complicated VBA, some type of subform / lookup scenario, or what.
Suggestions to point me in the right direction?
Thanks,
Joshua
Alan_G
Hi
When you've scanned your barcode, does it end with a special character (eg * ). If it does, then you could probably use the AfterUpdate event of the control that you're scanning the code into to go to a new record something like
If Right(Me.NameOfControl,1) = "*" Then
Docmd.GoToRecord , , acNewRec
End If
If the code doesn't currently end with a special character, generally you can make it do so with in the scanners settings.
Not tested but maybe an idea for you............
joshuamerritt
Yes, it both starts and ends with an "*". I'll look into your idea and post back the results, thanks.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.