Solved

Extracting information from a Text Box

Posted on 2001-06-21
4
142 Views
Last Modified: 2010-05-02
Hi,
I am writing an application in which we scan the new CreditCard Type State ID's or Drivers Liscense for Customer Information - The Format that scan's into a TextBox is:%STATECITY^LASTNAME$FIRSTNAME$MIDDLEINITIAL^ADDRESS^?;########STATEID#=##############=?

I want to place the value's into other text boxes to save time on filling out customer info ie:
State to txtState
City to txtCity
LastName to txtLastName
FirstName to txtFirstName
StateID to txtStateID

I have tried several ways without success.
The ## signs seem to be irrelevant information to what I need - I just want to extract the information shown above.

Thanks for looking into my question.

0
Comment
Question by:flosoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:hes
ID: 6215735
Try this (vb6 only)
Dim MyInfo1
Dim Myinfo2
Dim MyInfo3

MyInfo1 = Split(text1'or where else you get the data,"^")

This will put STATECITY in MyInfo1(0)
LASTNAME$FIRSTNAME$MIDDLEINITIAL in MyInfo1(1)
ADDRESS in MyInfo(2)
?;########STATEID#=##############=? in MyInfo(3)

Then
MyInfo2 = split(MyInfo(1),"$")

lastname will be in MyInfo2(0) and so forth
MyInfo(3) = replace(MyInfo(3),"?","")
MyInfo(3) = replace(MyInfo(3),";","")
MyInfo(3) = replace(MyInfo(3),"#","")
MyInfo(3) = replace(MyInfo(3),"=","")




0
 

Author Comment

by:flosoft
ID: 6225632
I just wanted to let you know that I am experimenting with the code and will make a decision in the next day or 2 - Thanks/.
0
 
LVL 20

Accepted Solution

by:
hes earned 100 total points
ID: 6227614
Whoops,
Just noticed something, a little ( ;) ) typo
This
ADDRESS in MyInfo(2)
?;########STATEID#=##############=? in MyInfo(3)

should be
ADDRESS in MyInfo1(2)
?;########STATEID#=##############=? in MyInfo1(3)

And this

MyInfo(3) = replace(MyInfo(3),"?","")
MyInfo(3) = replace(MyInfo(3),";","")
MyInfo(3) = replace(MyInfo(3),"#","")
MyInfo(3) = replace(MyInfo(3),"=","")


Should be
MyInfo1(3) = replace(MyInfo1(3),"?","")
MyInfo1(3) = replace(MyInfo1(3),";","")
MyInfo1(3) = replace(MyInfo1(3),"#","")
MyInfo1(3) = replace(MyInfo1(3),"=","")

Must have been typing to fast LOL








0
 

Author Comment

by:flosoft
ID: 6230004
Thanks,
It took some experimenting, and with a little modification I got it to work perfectly, Then to my suprise I scanned in another ID, same state, issued 2 month's apart and they use an entirely different format! Go Figure! The second had only numbers which only gave the State ID - hmmmmm, Well at least for proccesing customers with the format that mine has it will quick and painless thanks to your help.

Thanks again,
Tom
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month3 days, 15 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question