Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applying Mask to Combo Box Data

Status
Not open for further replies.

KerryL

Technical User
May 7, 2001
545
US
In one of my forms I use a combo box to search for records by phone number. When the user types or selects a phone number in the combo box, that record is dumped into the form.

I set the combo box mask to (999) 123-4567 but the only record that conforms to the mask is the one I select. All others in the combo box show up in normal numerical format, like this: 9991234567

How can I get all of the phone numbers that show up in the combo box dropdown list to be shown with the phone number mask of (999) 123-4567 ? Doing so will make it easier for the user to scroll down through the area codes to the correct phone number.


Thanks in advance.
 
The input mask on the table (where the data resides and is being pulled from) is already set to (999) 000-0000.

That's why I don't understand why the numbers in the combo box aren't being depicted that way.
 
KerryL,
I just fooled around with the Ph# in my table, made a combo box,set the input mask to
!\(999")"000\-0000;0;_
and the and the format to #
the data didn't show up correctly until I changed the actual phone #'s to 000-000-0000
if your phone nr's are in the table as 0000000000 they need to be changed to 000-000-0000 or perhaps you could change the input mask to match your entries.
The phone nrs did show up in the combo box I made with the area code as (000)000-0000
Jim
 
Thanks Jim, that explains it.

However, if the users have to enter each phone number as (999)111-2222 doesn't that sort of defeat the convenience of the data entry mask? :-0

Guess it's six of one, half a dozen of the other. I'd rather the users be able to quickly enter the ph numbers than worry about what they look like in the combo box.

Thanks for the help.

 
kerryl,
I'm not proficient at this, i use trial and error to get many of my results. I think if you fool around with different input mask settings you should be able to get the results with your data.
seems like the future entries will be ok.
Jim

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top