Re: reading from a card reader
- From: "JP Bless" <jp3BlessNoSpam@xxxxxxxxxxx>
- Date: Wed, 5 Jul 2006 07:18:29 -0400
No, input box will only work for single track magnetic card readers... That
is the card being read contains all the data as single line and the magnitic
card reader is single track reader. If you use inputbox for multi-track
readers then the card reader will read the first track into inputbox and
then chr(13) "event" will cause the reader to dump data stored in subsequent
tracks into next control/texbox in tab order.
Design your "inputbox" which basically is create a separate form, with a
textbox and set the textbox's multiline property to true. You can return the
entire tracks read by magstripe to "global variable" temp2. From there
decoding is question of separating the data into tracks using separator
sentinels.
Private Sub UpdateTemp2
frmX.Show 1
End Sub
Why don't you post the code you are using now... I mean the part where you
are using InputBox.
"Abby" <Abby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:29252A70-56F0-46F4-8F51-E918835002D0@xxxxxxxxxxxxxxxx
hi JP,3
i am using a inputbox function as
temp2 = InputBox("Please swipe the card now", "card reader")
where temp2 is a string
Now my question is shouldn't the temp2 string contain the data on all the
tracksthen
separated by chr(13) when i swipe the card?
Because when i see the value in temp2 only the track1 data is there and
track2 data goes in the textbox i have the focus set on.characters)
Is there a way to work around this?
thanks
"JP Bless" wrote:
Dim iTracks As Integer
Dim iCounter As Integer
'iTrack value must set to the number of tracks
'input magnetic stripe has
'Also default iCounter to 1
'Also ensure TextBox1 multiline property is set
Private Sub Form_Load()
iCount = 1
iTracks = 2 'Default to 1 track magstripe
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
On Error GoTo Err_KP
Select Case KeyCode
Case 13 'ENTER key...
'If magnetic card reader is one track..
If iTracks = 1 Then
'Put code here to decode/read input from magnetic reader
DoEvents
Unload Me
Exit Sub
End If
'If card reader is more than 1 track
If iCounter < iTracks Then
'iterate all tracks until all tracks are read
iCounter = iCounter + 1
Exit Sub
Else
'Put code here to decode/read input from magnetic reader
'Be aware that if more than 1 track is read
'Use start and stop sentinals (special separator
from a'to determine tracks relevant characters
iCounter = 1
DoEvents
End If
End Select
Exit Sub
Err_KP:
Exit Sub
End Sub
"Abby" <Abby@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:000AB258-1D63-46E8-9D5F-7743B01E5E4F@xxxxxxxxxxxxxxxx
Hi all,
I have an application in which I am trying to read the data stored
magnetic card reader. I was using the inputbox function but am able toread
only the 1st Track of data. i also need to read the data in the secondtrack.
Any help would be appreciated.
Thanks in advance.
.
- Follow-Ups:
- Re: reading from a card reader
- From: Abby
- Re: reading from a card reader
- References:
- Re: reading from a card reader
- From: JP Bless
- Re: reading from a card reader
- From: Abby
- Re: reading from a card reader
- Prev by Date: Re: generate random numbers
- Next by Date: Re: generate random numbers
- Previous by thread: Re: reading from a card reader
- Next by thread: Re: reading from a card reader
- Index(es):
Relevant Pages
|