Link to home
Start Free TrialLog in
Avatar of Laura Sheldon
Laura SheldonFlag for United States of America

asked on

Access 2007, input mask

Is it possible to use an input mask in an "Iif" function in a query to return the following:

A phone number with an extension or one w/o.

123-456-7891, Ext 1234

If applying the input mask using the properties window, I get the following:

(222-333-4444) = (   )  22-2333, Ext. 4444
(222-333-4444, Ext. 555) = (222) 333-4444, Ext. 555

* The Phone and Extension fields are in separate and joined with the following:
Fee Billing Phone: ([ClientPhone] & IIf([ClientExtension] Is Not Null,", " & [ClientExtension]))
Avatar of Laura Sheldon
Laura Sheldon
Flag of United States of America image

ASKER

Also, this is the IM I'm using on this field:
!\(###") "###\-####," Ext".\ ####;;_

This is the result I got using:
!(999) 000-0000 = (850) 298-4431 (w/ext) & 3109438171, 112 (w/o ext)
!(999) 000-0000, Ext. 0000 = 3109438171, 112 (w/ext) & (   )  85-0298, Ext. 4431 (w/o ext)
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The calculated field was the answer! Thanks!
Great.

Enjoy the weekend

;-)

Jeff