A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

BarCode Input



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2006, 04:34 PM posted to microsoft.public.access.forms
Greg
external usenet poster
 
Posts: 11
Default 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  
Old December 28th, 2006, 04:57 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default 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  
Old December 29th, 2006, 04:08 AM posted to microsoft.public.access.forms
Peter Yang [MSFT]
external usenet poster
 
Posts: 56
Default 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  
Old December 29th, 2006, 03:02 PM posted to microsoft.public.access.forms
Greg
external usenet poster
 
Posts: 11
Default 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  
Old February 8th, 2010, 12:38 AM
lxf lxf is offline
Member
 
First recorded activity by OfficeFrustration: Feb 2010
Posts: 1
Default

Quote:
Originally Posted by Greg View Post
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/subscripti...s/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/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

I have the same situation now, however, my scanner have no Tab/Enter function. I tried keypress event, but the last digit cannot be entered. Could you help me?
Thank you very much.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.