capture strings of data in forms without enter or tab key to move on to next form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying set up a form where several pieces of information (part #, location, then qty) are entered in and then the form closes and returns to the main screen.

The information entered into the form is coming in from a Symbol scanner via barcodes for the part # and location, however, the qty is typed in manually in the scanner and then sent.

The way it is currently set up is with an event procedure, on change, it runs a macro taking it back to the main screen. However, this only works for quantities up to 9. Anything greater than 9 is cut off and only the first number is entered. I'm guessing that rather than seeing the entire string of numbers ( ex. 17 or 1 - 7) coming from the scanner it sees "1" entered as the change and runs the macro before the "7" comes across). The enter command on the scanner is also not sent with the information so I can't set it up to be "on enter" Does anyone know of any workarounds or codes to be able to handle this issue and wait for the entire string of numbers before proceeding to the macro.

Any help you could give would be much appreciated!
Thanks,
Jason
 
Jason,

Put this code in the AfterUpdate event of the Qty field:

DoCmd.GoToRecord,,acNewRec

After the scanner sends the Qty to the form, the form will go to a new record to
enter a new part.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
www.pcdatasheet.com


jtd135 said:
I am trying set up a form where several pieces of information (part #,
location, then qty) are entered in and then the form closes and returns to the
main screen.
The information entered into the form is coming in from a Symbol scanner via
barcodes for the part # and location, however, the qty is typed in manually in
the scanner and then sent.
The way it is currently set up is with an event procedure, on change, it runs
a macro taking it back to the main screen. However, this only works for
quantities up to 9. Anything greater than 9 is cut off and only the first
number is entered. I'm guessing that rather than seeing the entire string of
numbers ( ex. 17 or 1 - 7) coming from the scanner it sees "1" entered as the
change and runs the macro before the "7" comes across). The enter command on
the scanner is also not sent with the information so I can't set it up to be "on
enter" Does anyone know of any workarounds or codes to be able to handle this
issue and wait for the entire string of numbers before proceeding to the macro.
 
jtd135 said:
I am trying set up a form where several pieces of information (part
#, location, then qty) are entered in and then the form closes and
returns to the main screen.

The information entered into the form is coming in from a Symbol
scanner via barcodes for the part # and location, however, the qty is
typed in manually in the scanner and then sent.

The way it is currently set up is with an event procedure, on change,
it runs a macro taking it back to the main screen. However, this
only works for quantities up to 9. Anything greater than 9 is cut
off and only the first number is entered. I'm guessing that rather
than seeing the entire string of numbers ( ex. 17 or 1 - 7) coming
from the scanner it sees "1" entered as the change and runs the macro
before the "7" comes across). The enter command on the scanner is
also not sent with the information so I can't set it up to be "on
enter" Does anyone know of any workarounds or codes to be able to
handle this issue and wait for the entire string of numbers before
proceeding to the macro.

Any help you could give would be much appreciated!
Thanks,
Jason

Don't use the Change event, as that will fire with every character sent
to the text box. You should use the AfterUpdate event, since that will
only fire when entry to the control is complete. But if the scanner
doesn't send an Enter keystroke, I'm not sure how the control is going
to know that the entry is complete. You can set the text box to
auto-tab when a maximum number of characters have been entered, but that
won't help if some lesser number of digits is sent.

I'm surprised that you can't get the scanner to send an Enter key at the
end of a line of data. I thought that was pretty standard. Failing
that, can you get it to send all quantities as a fixed maximum number of
digits, with leading zeros?
 
Back
Top