coding for movement between control boxes in form

G

Guest

I am trying to set up a form with 4 control boxes with data inputted via barcodes and a scanner. The first control box is a part #, the second one is a location number, the third one is a crate #, and the forth one is a quantity.

I posted this issue before but I incorrectly described the problem. The issue is error-proofing the process so that if the part number is scanned in twice, the second part number scan will be ignored. Access is setup now to catch this error and pop up a message saying that the wrong type of data was inputted. However, due to the fact that we are using a wireless scanner away from the database, the user does not see this message and continues his/her job.

The part number barcode inputs the following into Access:
1. "A"
2. Tab
3. Part #
4. Enter

This leaves the cursor highlighting a default location number, "11", in the "Location" control box. The correct next step would be to scan in the location barcode which sends the following information:
1. Location Number (ex. "2")
2. Tab
3. Crate Number
4. Enter

My question is the following:
How do I code the form so that if the part # barcode was scanned (which begins with a tab), the tab and the rest of the barcode are ignored by the "Location" control box such that it would not ignore the correct scan of the location barcode?

Is there some code I could use to not let the cursor move out of the box if the value 11 was still present?

Any help anyone could give me on the this matter would be much appreciated.

Thanks!
-Jason
 
C

Chris

I assume that the scanner info is getting as ***keyboard
data***
If this is the case, the best way may be to turn on the
form "keyPreview" property (listed under events) and use
the form keydown event to store and process the input.
Once a message has been completed, your code could then
paste the data into the four controls

-----Original Message-----
I am trying to set up a form with 4 control boxes with
data inputted via barcodes and a scanner. The first
control box is a part #, the second one is a location
number, the third one is a crate #, and the forth one is a
quantity.
I posted this issue before but I incorrectly described
the problem. The issue is error-proofing the process so
that if the part number is scanned in twice, the second
part number scan will be ignored. Access is setup now to
catch this error and pop up a message saying that the
wrong type of data was inputted. However, due to the fact
that we are using a wireless scanner away from the
database, the user does not see this message and continues
his/her job.
The part number barcode inputs the following into Access:
1. "A"
2. Tab
3. Part #
4. Enter

This leaves the cursor highlighting a default location
number, "11", in the "Location" control box. The correct
next step would be to scan in the location barcode which
sends the following information:
1. Location Number (ex. "2")
2. Tab
3. Crate Number
4. Enter

My question is the following:
How do I code the form so that if the part # barcode was
scanned (which begins with a tab), the tab and the rest of
the barcode are ignored by the "Location" control box such
that it would not ignore the correct scan of the location
barcode?
Is there some code I could use to not let the cursor move
out of the box if the value 11 was still present?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top