Mobile number from 3 fields

S

Simon

I have a customer table that has 3 field for contact numbers, so are a
mixture of mobile number and Land line number

I would like a way to find out if any of the fields have a mobile
number so any number starting with 07 and remove any space and dispay
it in a text feild on a form

I need the mobile number for sending auto text messages

Thanks veyr much for your help
 
J

John W. Vinson

I have a customer table that has 3 field for contact numbers, so are a
mixture of mobile number and Land line number

I would like a way to find out if any of the fields have a mobile
number so any number starting with 07 and remove any space and dispay
it in a text feild on a form

I need the mobile number for sending auto text messages

Thanks veyr much for your help

Sure; set the control source of a textbox on the form to

=IIF([fieldname] LIKE "07*", Replace([fieldname], " ", ""), Null)

Better might be to create a normalizing query such as

SELECT ClientID, Replace([Phone1], " ", "") AS Mobile WHERE [Phone1] LIKE
"07*"
UNION ALL
SELECT ClientID, Replace([Phone2], " ", "") AS Mobile WHERE [Phone2] LIKE
"07*"
UNION ALL
SELECT ClientID, Replace([Phone3], " ", "") AS Mobile WHERE [Phone3] LIKE
"07*"

to get a tall-thin recordset of all the mobile numbers (one client might have
two such numbers...!); you can then display this query in a Subform on your
form, linked by ClientID.
 

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