Barcode Scanner to launch another form

Steve27597

New member
Local time
Today, 17:06
Joined
Feb 25, 2014
Messages
8
Hello All.
Still working on an meeting registration app in Access. I have a Main menu which contains buttons that allow search by Name, Phone Number, or Account Number. We are using barcode scanners if they have a registration card.
Currently I have an account button which pops up a query prompt window and when they scan the code it fills the prompt with their account number and a carriage return, pulling up an account registration form with their info.
What I would like to do is from the main form, if a barcode is scanned, to automatically lauch the account form passing the scanned account number.
Is it possible and any suggestions on coding?

Thanks in advance,
Steve
 
In the after update event of the textbox capturing the scan:

Code:
If Me.TextboxName = "TheDesiredScan" Then
  DoCmd.OpenForm...
End If
 
As far as I understand you will pass the information from the barcode into the called form

You can use arguments
Docmd.openform "YourFormName" , acnormal, , , , , yourargument

In the called form "YourFormName" in the form_load event

if not isnull(me.openargs) then
"Here goes your code"
endif
 
PBaldy,
Can I do it without a msgbox? My Main Form is a simple form with a couple of push buttons. Or should I put a textbox on the main form and wait for input there?

Thanks for the response,
-Steve
 
boerbende,
I understand your docmd, but what even would I tie that to? If I was sitting on a form with no fields, just buttons, what even would be triggered with a barcode scan (and carriage return programmed in scanner)?

Thanks for your response,
Steve
 
You mean a textbox? Possibly, but generally speaking a scanner provides keyboard input. What keyboard input would you use on a form with only buttons to do what you want? If you want to gather a barcode and do something with it, I think you're going to need a textbox.

I hadn't picked up on passing the scanned in barcode, so using OpenArgs is certainly a good option for that.
 
Thanks guys. I used both your responses. I decided just to create a text box on the main form and used the "After Update" event on the field. Then I passed the field using the DoCmd calling the form. I used the information I used from a previous reply from Paul.

This will work!
Liking this forum.
-Steve
 
Glad you got it working Steve.
 

Users who are viewing this thread

Back
Top Bottom