[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can I keep an expression from dropping perenthesis in phone number input mask?

Posted on 2008-11-11
5
Medium Priority
?
317 Views
Last Modified: 2013-11-24
I have a report using the following expression:

=IIf([HomePhone] Is Null,"",[HomePhone] & Chr(13) & Chr(10)) & [MobilePhone] & " (cell)" & IIf([SpousePhone] Is Null,"",Chr(13) & Chr(10) & [SpousePhone] & " (" & [SpouseName] & ")")

The expression does what it is supposed to do, except, I am using an input mask for the phone numbers and so the phone number is coming out without any perenthesis and dashes like it should.  For example, the phone number (111) 222-3333 is coming out on the report as 1112223333 and is unacceptable.  I have searched and have been unsuccessful in finding a solution.  Can this be resolved?

Thanks in advance for help!

defixer
0
Comment
Question by:defixer
  • 3
  • 2
5 Comments
 
LVL 20

Expert Comment

by:ElrondCT
ID: 22941204
If you use a mask, the parentheses and dashes are not actually stored in the database. You need to put them in yourself when you pull the information back out. You may want to set up a function that will do that, but how the function is written depends on what database application you're using. You've posted your question in the dBase zone, but the use of brackets around the field names makes it look like you may be working in Access instead. If you can post what you're working in, I (or someone else) can help you with writing an appropriate function, if you need help.

0
 

Author Comment

by:defixer
ID: 22946854
Sorry about that.  When I submitted my question I was pretty sure I selected Microsoft Access.  Guess I goofed.  You are right I'm using MS Access 2003.  Thanks for the reply.
0
 
LVL 20

Accepted Solution

by:
ElrondCT earned 750 total points
ID: 22951658
I don't do much programming in Access. I think my answer about masks is correct for there as well as dBase, but if you need assistance with designing a function to put parentheses and dashes into each phone number, you should post a new question in the Access zone.
0
 

Author Comment

by:defixer
ID: 22964434
Thank you.  I reposted in the Access Zone and got a fix in just a couple of days.
0
 

Author Closing Comment

by:defixer
ID: 31515762
I don't know what the policy is, but he got me pointed in the right direction and when I reposted in the Access Zone where I thought I was when I posted this question I quickly got a solution.  I would like to see him awarded the points if possible because he did try and was very courtious and helpful even though he was unable to give me a resolution a resolution.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
Viewers will learn the different options available in the Backstage view in Excel 2013.

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question