Dave-

If there are always 10 digits starting with the fourth position, you could
do:

  Me.MemberNo = Mid(Me.MemberNo, 4, 10)

If you need to scan character by character, you could do:

Dim intP As Integer, strResult As String

  For intP = 1 To Len(Me.MemberNo)
    If IsNumeric(Mid(Me.MemberNo, intP, 1)) Then
      strResult = strResult & Mid(Me.MemberNo, intP, 1)
    End If
  Next intP
  Me.MemberNo = strResult

John Viescas, author
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
Running Microsoft Access 2000
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
For the inside scoop on Access 2007, see:
http://blogs.msdn.com/access/


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of DRR
Sent: Monday, June 05, 2006 12:13 AM
To: [email protected]
Subject: RE: [ms_access] Scanner question

Hi John:

That sounds like a plan. However, could please give me a "sample" of coding
that would eliminate the "junk"? I'm assuming something like "If it ain't a
# skip it" BUT, I'm not that great of a coder to write this.

Thanks for the prompt reply and any help.

=Dave R.=

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of John Viescas
Sent: Sunday, June 04, 2006 4:35 PM
To: [email protected]
Subject: RE: [ms_access] Scanner question


Dave-

Perhaps use the BeforeUpdate event of the control to eliminate the junk -
keeping only the numbers.

John Viescas, author
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
Running Microsoft Access 2000
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
For the inside scoop on Access 2007, see:
http://blogs.msdn.com/access/


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of DRR
Sent: Sunday, June 04, 2006 10:05 PM
To: [email protected]
Subject: [ms_access] Scanner question

Hi All:

This is probably going to be a simple problem you all you experts out there
but....I'm stumped.

I'm using a card reader to scan cards for membership entry into a health
club. I am bringing up a form that has the first field that allows the card
to be scanned.

My problem is two fold. 

1). The card scans perfectly into the field BUT all the "grabage characters
at the begining and the "?" at the end are also included. How can I get the
"field" to eliminate the preceeding characters and the last "?" and display
ONLY the numbers. There must (I hope) be a way to ignore the first 4
characters and the last character. (All the cards a identical) so I should
be safe eliminating the same chars on each read.

Below is an example of a card scan.


;:<>4054969364?


Ocen this is done, I hope to be able to automatically have Access lookup the
name attached to this number (That should be easy enough.). But one problem
at a time.

Thanks
=Dave R.=




[Non-text portions of this message have been removed]





Yahoo! Groups Links












SPONSORED LINKS
Microsoft
<http://groups.yahoo.com/gads?t=ms&k=Microsoft+access+database&w1=Microsoft+
access+database&w2=Database+development+software&w3=Database+management+soft
ware&w4=Database+software&w5=Inventory+database+software&w6=Membership+datab
ase+software&c=6&s=190&.sig=hc7Za8QzEj1t7F8GW0yzhA> access database
Database
<http://groups.yahoo.com/gads?t=ms&k=Database+development+software&w1=Micros
oft+access+database&w2=Database+development+software&w3=Database+management+
software&w4=Database+software&w5=Inventory+database+software&w6=Membership+d
atabase+software&c=6&s=190&.sig=i5H8GCn7HzmglwpvhJg19w> development software
Database
<http://groups.yahoo.com/gads?t=ms&k=Database+management+software&w1=Microso
ft+access+database&w2=Database+development+software&w3=Database+management+s
oftware&w4=Database+software&w5=Inventory+database+software&w6=Membership+da
tabase+software&c=6&s=190&.sig=kzlRmjQuUTEFLTjkEd6-kg> management software

Database
<http://groups.yahoo.com/gads?t=ms&k=Database+software&w1=Microsoft+access+d
atabase&w2=Database+development+software&w3=Database+management+software&w4=
Database+software&w5=Inventory+database+software&w6=Membership+database+soft
ware&c=6&s=190&.sig=CoCmr_EubT5Xd83NiQjcpg> software       Inventory
<http://groups.yahoo.com/gads?t=ms&k=Inventory+database+software&w1=Microsof
t+access+database&w2=Database+development+software&w3=Database+management+so
ftware&w4=Database+software&w5=Inventory+database+software&w6=Membership+dat
abase+software&c=6&s=190&.sig=DHnS8Uu1ImyGVg1J4k0BMw> database software
Membership
<http://groups.yahoo.com/gads?t=ms&k=Membership+database+software&w1=Microso
ft+access+database&w2=Database+development+software&w3=Database+management+s
oftware&w4=Database+software&w5=Inventory+database+software&w6=Membership+da
tabase+software&c=6&s=190&.sig=uEGHlFpqbscHu8mCHe7tzg> database software


  _____ 

YAHOO! GROUPS LINKS


     
*      Visit your group "ms_access
<http://groups.yahoo.com/group/ms_access> " on the web.
 

*      To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
 

*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


  _____ 




[Non-text portions of this message have been removed]





Yahoo! Groups Links










SPONSORED LINKS
Microsoft access database Database development software Database management software
Database software Inventory database software Membership database software


YAHOO! GROUPS LINKS




Reply via email to