469,950 Members | 1,934 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Format x column of Combo Box/ List Box as a phone number – (xxx) xxx-xxxx

Having trouble in Access XP. I want to display the customers name,
city and phone number in a Combo Box but the but the formatting is
lost – eg (123) 456-7890 is displayed as 1234567890.

Any idea how to format the control. From what I can see, the combo
box has a format option but I am referring to the 3rd column. The
results display properly within the underlying query… it’s
the Combo Box that loses the formatting.

Thoughts? Thank you
Nov 13 '05 #1
2 6545
Try using something like this in the RowSource of your Combo Box

SELECT CusName, CusCity, Format([CusPhoneNumber],"(@@@) @@@-@") AS PhoneNo,
CustomerID FROM Customers;

Note that the bound column will be column 4

HTH

Phil

"Dman" <De*****@hotmail.com> wrote in message
news:b5**************************@posting.google.c om...
Having trouble in Access XP. I want to display the customers name,
city and phone number in a Combo Box but the but the formatting is
lost – eg (123) 456-7890 is displayed as 1234567890.

Any idea how to format the control. From what I can see, the combo
box has a format option but I am referring to the 3rd column. The
results display properly within the underlying query… it’s
the Combo Box that loses the formatting.

Thoughts? Thank you

Nov 13 '05 #2
Thank you. That worked perfectly. Thanks again.

"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:<41*********************@mercury.nildram.net> ...
Try using something like this in the RowSource of your Combo Box

SELECT CusName, CusCity, Format([CusPhoneNumber],"(@@@) @@@-@") AS PhoneNo,
CustomerID FROM Customers;

Note that the bound column will be column 4

HTH

Phil

"Dman" <De*****@hotmail.com> wrote in message
news:b5**************************@posting.google.c om...
Having trouble in Access XP. I want to display the customers name,
city and phone number in a Combo Box but the but the formatting is
lost – eg (123) 456-7890 is displayed as 1234567890.

Any idea how to format the control. From what I can see, the combo
box has a format option but I am referring to the 3rd column. The
results display properly within the underlying query… it’s
the Combo Box that loses the formatting.

Thoughts? Thank you

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by Philipp Lenssen | last post: by
6 posts views Thread by dam_fool_2003 | last post: by
1 post views Thread by Mike | last post: by
7 posts views Thread by Frank Millman | last post: by
9 posts views Thread by Markus | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.