Hi Everyone,
I have been trying to resolve this issue for hours and have finally decided to ask for some help as I am
sure it is something very simple I'm missing.
I have provided a "cut down" sample database (XXLateral.zip) containing just the form and 2 tables and a query. It is in Access 2007 format.
An overview:
I have developed a database that contains stock and inventory functionality.
"Parts" are attached to "Locations".
Both Parts and Locations have barcodes that can be printed off and attached to the individual part and the actual storage box (Location) that the part is located in.
Currently, when a stocktake is actioned, a report is generated, sorted in Location order and contains a list of the parts and how many there should be (SOH). Somebody then manually counts the parts and then writes the actual number
onto the report. Somebody else then takes the information from the report and enters it into the database.
This works fine but I want to implement a better method by using a cordless hand scanner to scan either the Location Barcode or the Part Barcode.
I am in the early stages of designing the form that will accept the output from the hand scanner.
The form, fStocktakeUpdate_34, has been designed to be primarily driven by a touch screen and displays the various records as a Continuous Form and also displays am image that is stored externally as a JPG but I have removed
this from the sample database..
There is a text box called "txtSearchMain" that has some VBA code in the On Key Up event that is doing my head in a bit.
Basically, the Location barcodes start with a "LOC-" prefix and the Parts barcodes start with a "SKU-" prefix.
I want to use the same barcode scanner to scan either the Location of Parts barcode into the "txtSearchMain" text box and have the VBA code in the On Key Up event decide if it start starts with LOC- or SKU- and direct it to the correct
VBA code.
The bacode scanning is working fine BUT the logic in the On Key Up event is not working consistently when the SKU- barcode is scanned.
If you look at the [BarcodeNymberRaw] field in the Parts table you will see that there is a SKU-00001.
If you manually type this into the "txtSearchMain" text box you get an error. Yet if you type in SKU-01072 with works fine and locates the correct part.
I just can't seem to figure out what the issue is and hope somebody can help me out.
Cheers
Greg
I have been trying to resolve this issue for hours and have finally decided to ask for some help as I am
sure it is something very simple I'm missing.
I have provided a "cut down" sample database (XXLateral.zip) containing just the form and 2 tables and a query. It is in Access 2007 format.
An overview:
I have developed a database that contains stock and inventory functionality.
"Parts" are attached to "Locations".
Both Parts and Locations have barcodes that can be printed off and attached to the individual part and the actual storage box (Location) that the part is located in.
Currently, when a stocktake is actioned, a report is generated, sorted in Location order and contains a list of the parts and how many there should be (SOH). Somebody then manually counts the parts and then writes the actual number
onto the report. Somebody else then takes the information from the report and enters it into the database.
This works fine but I want to implement a better method by using a cordless hand scanner to scan either the Location Barcode or the Part Barcode.
I am in the early stages of designing the form that will accept the output from the hand scanner.
The form, fStocktakeUpdate_34, has been designed to be primarily driven by a touch screen and displays the various records as a Continuous Form and also displays am image that is stored externally as a JPG but I have removed
this from the sample database..
There is a text box called "txtSearchMain" that has some VBA code in the On Key Up event that is doing my head in a bit.
Basically, the Location barcodes start with a "LOC-" prefix and the Parts barcodes start with a "SKU-" prefix.
I want to use the same barcode scanner to scan either the Location of Parts barcode into the "txtSearchMain" text box and have the VBA code in the On Key Up event decide if it start starts with LOC- or SKU- and direct it to the correct
VBA code.
The bacode scanning is working fine BUT the logic in the On Key Up event is not working consistently when the SKU- barcode is scanned.
If you look at the [BarcodeNymberRaw] field in the Parts table you will see that there is a SKU-00001.
If you manually type this into the "txtSearchMain" text box you get an error. Yet if you type in SKU-01072 with works fine and locates the correct part.
I just can't seem to figure out what the issue is and hope somebody can help me out.
Cheers
Greg