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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox formatting 2

Status
Not open for further replies.

Rich8541

Technical User
Dec 10, 2010
14
US
Hi, I have a listbox that is based on a query to return contractor info. Just one record based on a selection from a combo box. One of the fields is the phone number. In the query it is formatted to show dashes between the numbers such as 609-111-2222. But in my listbox the numbers have no dashes such as 6091112222. How can I get the dashes to appear in the listbox? And is there a way to word wrap the data in the listbox? I wanted the name and address to appear as it would on a letter for example, to save space on the form.Thanks, Rich
 
Rich8541 . . .

A custom field will do. Assuming your field is named [blue]Phone[/blue], in an empty field in the field row of the query grid, copy/paste the following:
Code:
[blue]PH:Format([Phone], "@@@-@@@-@@@@")[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top