If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
BarCode Input
I have a form that I want us a Bar Code Scanner as its input device. I have
no problem scanning data into a text field when the cursor is in the text field. But, what I want to do is to have my application be aware of when a barcode scan is entered. For example, I have a main menu for with no text boxes for data input. What I want the user to be able to do is scan a Work Ticket Document and based on the data input automatically transfer to another form. How can I capture data input from a scanner without displaying it into an actual text box. If a barcode with certain text in it is scanned, I want the form to transfer control to another form for further processing. Or, must I enter the text into a hidden field for the purposes of capturing the data first and then using the Timer Event ot process it? I use the Form_KeyPress Event to see if that would capture the data input, but it does not do that. What event would capture data input from a barcode device without having to display it on a form? Thanks, I hope I've been clear in what I'm asking for. Thanks for your help in advance. Greg |
#2
|
|||
|
|||
BarCode Input
Greg wrote:
I have a form that I want us a Bar Code Scanner as its input device. I have no problem scanning data into a text field when the cursor is in the text field. But, what I want to do is to have my application be aware of when a barcode scan is entered. For example, I have a main menu for with no text boxes for data input. What I want the user to be able to do is scan a Work Ticket Document and based on the data input automatically transfer to another form. How can I capture data input from a scanner without displaying it into an actual text box. If a barcode with certain text in it is scanned, I want the form to transfer control to another form for further processing. Or, must I enter the text into a hidden field for the purposes of capturing the data first and then using the Timer Event ot process it? I use the Form_KeyPress Event to see if that would capture the data input, but it does not do that. What event would capture data input from a barcode device without having to display it on a form? Thanks, I hope I've been clear in what I'm asking for. Thanks for your help in advance. Greg You can have a small unbound TextBox whose only purpose is to receive the barcode scan and then your code can react to that in the AfterUpdate event of that TextBox. Since barcode scans are perceived the same as keyboard strokes I see no other obvious way to deal with it. The problem is that the TextBox will have to have focus when the barcode scan occurs. -- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
BarCode Input
Hello Greg,
As I know, many barcode scanners work by plugging into the keyboard port so the scanned "word" appears to the PC the same as if the characters were typed via the keyboard. In this case, no special programing is required for the Access program. If there is no textbox on a form, Form_KeyPress Event may not work as you expect. YOu may try to add a dummy textbox on the form with height/width=0, and set focus to it when the form loads. For the change or other events, you could get the barcode information and then try to do thinngs in other forms as you want: Private Sub Form_Load() Text1.SetFocus End Sub Private Sub Text1_Change() ' do what you want from here 'MsgBox Text1.text, vbOKOnly End Sub When a textbox is set to "invisible", it is not to "setfocus" and you cannot get the barcode information then. Please see the following article for some useful informaiton about barcode: http://www.granite.ab.ca/access/barcode.htm Many scanners can be set up to include a Tab or Enter at the end of the scanned data so that sometimes you just place the focus in the desired TextBox, scan the barcode, and the data automatically is entered and the focus automatically moves to the next field. If you have any comments, please feel free to let's know. Thank you. Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#4
|
|||
|
|||
BarCode Input
Your comments are what I discovered through more testing during the day and
you are correct. My scanner does include the TAB/ENTER character at the end so the AfterUpdate Event of the text box appears to fire off. Thanks for the suggestion on setting the height to ZERO. I didn't think of that one. Thanks for the help. Greg "Peter Yang [MSFT]" wrote: Hello Greg, As I know, many barcode scanners work by plugging into the keyboard port so the scanned "word" appears to the PC the same as if the characters were typed via the keyboard. In this case, no special programing is required for the Access program. If there is no textbox on a form, Form_KeyPress Event may not work as you expect. YOu may try to add a dummy textbox on the form with height/width=0, and set focus to it when the form loads. For the change or other events, you could get the barcode information and then try to do thinngs in other forms as you want: Private Sub Form_Load() Text1.SetFocus End Sub Private Sub Text1_Change() ' do what you want from here 'MsgBox Text1.text, vbOKOnly End Sub When a textbox is set to "invisible", it is not to "setfocus" and you cannot get the barcode information then. Please see the following article for some useful informaiton about barcode: http://www.granite.ab.ca/access/barcode.htm Many scanners can be set up to include a Tab or Enter at the end of the scanned data so that sometimes you just place the focus in the desired TextBox, scan the barcode, and the data automatically is entered and the focus automatically moves to the next field. If you have any comments, please feel free to let's know. Thank you. Best Regards, Peter Yang MCSE2000/2003, MCSA, MCDBA Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscripti...ult.aspx#notif ications http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#5
|
|||
|
|||
Quote:
Thank you very much. |
Thread Tools | |
Display Modes | |
|
|