In a query, I’m wanting to test the length of a field containing either a 7 or 11 digit phone number and format them based on the length of the field. Here’s the syntax I’m using:
Number Dialed: IIF(Len(Trim([Out_NumberDialed]))=7, Format([Out_NumberDialed],”###-####”), Format([Out_NumberDialed],”(###) ###-####”))
which isn’t working… Any suggestions will be much appreciated.
BTW, the data is being pushed from a SQL database into Access, so I can’t change any field properties in the table.
Many thanks!
Kathy