Strip out part of a text field

  • Thread starter injanib via AccessMonster.com
  • Start date
I

injanib via AccessMonster.com

Hi,
I have a text field on my form where I scan barcodes from incoming packages.
What I need is a code that will count the number of digits of the number
scanned from the bar code. In this case all the digits are numeric. If the
number of digits are 32 then it should strip out the first 16 and the last 4
digits and display the remaining 4 digits in another field called
TrackingNumber.
 
I

injanib via AccessMonster.com

Thanks, although I made an typing error when I explained what I wanted the
first time.
Basically I want the first 16 digits and the last 4 digits to be stripped out
and give me the 12 remaining digits in the TrackingNumber field, which would
be digit 17-28

Roger said:
Here's some psuedocode:

If len([text field]) = 32 then
[TrackingNumber] = right([text field],4)
[text field] = mid([text field], 16,12)
Else
'do something else
end if
Hi,
I have a text field on my form where I scan barcodes from incoming
[quoted text clipped - 5 lines]
digits and display the remaining 4 digits in another field called
TrackingNumber.
 
I

injanib via AccessMonster.com

Never Mind. I got it. Thanks allot.
Thanks, although I made an typing error when I explained what I wanted the
first time.
Basically I want the first 16 digits and the last 4 digits to be stripped out
and give me the 12 remaining digits in the TrackingNumber field, which would
be digit 17-28
Here's some psuedocode:
[quoted text clipped - 10 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top