Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on how best to parse text 2

Status
Not open for further replies.

robojeff

Technical User
Dec 5, 2008
220
US
I have a bar code which contains a "part number", a "from location", a "quantity", a "To location", and a "lot code" field and all of these fields are seperated by a tab.

A typical bar code might decode as follows:

N18-128200 WH 3 LOC04 1d2423
(part) (from) (qty) (to) lot)

Because these fields can be of different lengths, how
can I parse each field from an individual text box on my
form into certain controls on my form with extra space compression?

I envision having the user scan the bar code into one text box field on the form and then have this data populate certain controls on my form with the data derived from the bar code...

I would like to store the "part number" into Me.Part,
the from data into Me.from, the quantity into Me.qty, the
to data into Me.to, and the lot info into Me.lotsn

Is there an efficient way of doing this?


Thanks in advance...
 
Thanks Strongm-

I updated my Access 2003 to include all options and I now have the Microsoft rich box but when I set it onto my form I get the following message:

'The OLE server isn't registered - To register the OLE server, re-install it'

I made sure that the OLE automation is set in my references but am not sure what else to do about it..

If I can get this control working, I can try the test code to see what is being input from the bar code reader...

 
Well, I figured out a "work around" for this.... it isn't pretty but it works...

I added a bunch of dummy text boxes and placed them in tab order after the field that I scan the bar code into. These had to be visible to work so I shrinked them down so the user won't see them.

I made these all a default value and added a button to look at the values ofthese dummy boxes to see where the bar code was running off to and on that text box, I placed some code on the Got focus event to set the values of the other controls based off the data in the bar code...

Like I stated earlier.... It isn't pretty but it works.

thank you everyone for all your helpful suggestions and patience with me on this.


 
>I added a bunch of dummy text boxes and placed them in

Er I thought this had been suggested back on 15th October, and you said that you'd tried it and it didn't work.
 
>These had to be visible to work so I shrinked them down so the user won't see them.

If that doesn't make them completely invisible, another idea would be to make the left value a negative number, at least the width of the text box. Then the user would not see them.

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top