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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse - specific number combination 1

Status
Not open for further replies.

MRKCK

Technical User
Joined
Oct 13, 2008
Messages
2
Location
US
I need a function that will test if a text field (of any length) has a 7 digit number combination that begins only with a "10", "20", or "80" and if so, return the 7 digit combination.
Something like the the function provided to Dave177 by willybgw (amazing work!) would be perfect if it can be modified to find the three different number combinations.
Any help would be greatly appreciated!
 
Try
Code:
...like "*[128]0#####*"

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Thanks! I have it working as:
-----------
If TARGET Like "10#####" Or TARGET Like "20#####" Or TARGET Like "80#####" Then
-----------
The one thing I forgot to mention is to look for delimiters at the end of the combination. These numbers are usually separated by one of many delimiters (/, )ectera.
Is there a way to look for any of the delimiters at the end of the combination?
 
If TARGET Like "[128]0#####[/,;]*" Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top