Jump to content

UK telephone number masking


This topic is 6525 days old. Please don't post here. Open a new topic instead.

Recommended Posts

All UK mobile numbers are as follows:-

XXXXX XXX XXX (11 digits)

e.g 07747 340 147 (11 digits)

Can someone help me so that when i put in XXXXXXXXXX this gives me a result of (XXXXX) XXX XXX or XXXXX XXX XXX

Thanks in advance.

Link to comment
Share on other sites

Hi akfruit!

To get (XXXXX)XXX XXX

"(" & Left( Abs(Phone Number Field), 5) & ")" & Middle( Abs(Phone Number Field), 6, 3) & " " & Right( Abs(Phone Number Field), 3)

To get XXXXX XXX XXX

Left( Abs(Phone Number Field), 5) & " " & Middle( Abs(Phone Number Field), 6, 3) & " " & Right( Abs(Phone Number Field), 3)

HTH,

Kate :P

Link to comment
Share on other sites

Martin,

Alright this is where an FM God I am not! I know I had this problem before with a leading "0" and I think I figured it out, but I'm drawing a blank this morning. I'll keep trying, but does anyone else know why this happens?

Kate :P

Link to comment
Share on other sites

Lets establish one fact the resulting format are bound to be "text" to behave most predicatble!

My stab at it would be this:

"(" & Replace ( Replace ( Left ( entry ; 11 ) ; 9 ; 0 ; " " ) ; 6 ; 0 ; ") " )

...and please note that last paranthesis if followed by a inside the quotes!

--sd

Edited by Guest
Link to comment
Share on other sites

Hello Folks

Further to my post yesterday to say that it works. I have encoutered a little problem.

When I open a new record Iget "()" automatically showing in the field.

Anybody know why this is happening?

Thanks

Martin

Link to comment
Share on other sites

This topic is 6525 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.