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

Search Phone Number Field From Parameter 2

Status
Not open for further replies.

WestView

Technical User
Jan 7, 2003
67
US
Hello All,

I have a report that returns records based on a parameter field that searches a phone number field. Users want to enter just the number into the parameter field i.e. "1234567890" for a field string (inconsistantly) formatted like "(123) 456-7890" or "123-456-7890".

Is this possible?

Thanks!

 
Do a stripped-down version. Something like
Replace (Replace (Replace (Replace({your.phone}, ")", ""), "(", ""), " ", ""), "-", ""), getting rid of unwanted characters.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Madawc,

That worked beautifully!

Thanks!!!!

Tom
 
I've just remembered - there is a much simpler method. Val({your.phone}) is a dedicated function which will get rid of any non-numerics.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Madawc,

Thanks. I tried that, but it stops reading the string after the first non-numeric character. For example, if a phone number in the field is "(123) 456-7890" then it will not return the record.

Your first post worked just fine!

Thanks again,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top