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

Combo Box Field Property setting 1

Status
Not open for further replies.

w8n

Technical User
Sep 2, 2000
10
US
Access 2000 in Windows 98 SE. I have a four column combo box that uses an SQL statement as its Row Source. The returned data is correct. Two of the columns in this Combo Box are Phone numbers, and I would like to set an appropriate Input mask. I have attempted to go into the Query Builder and set the Field Properties for each column individually, but the Properties won’t stay. I select the column, left-click, Properties, and on the General tab, fill in the appropriate Input Mask for phone number. After exiting the Query Builder, I immediately go back in to check the Field Properties, only to find the Input Mask has been blanked out. The data being grabbed is correctly masked in its table, but is NOT masked in the Combo Box. Is there a way to set the Field Property through Visual Basic, or some other method? Am I not saving the Field Properties correctly? Perhaps Access 2000 has an oddity with Field Settings? Any info is appreciated in advance. W8n
 
You could try this:

In your SQL statement, instead of just selecting the phone number, format it. For example, instead of:

SELECT NAME, PHONE FROM TABLE

use this:

SELECT NAME, FORMAT(TABLE.PHONE,"000-000-0000") AS PHONE FROM TABLE



[shadeshappy] Cruising the Information Superhighway
[sub] (your mileage may vary)[/sub]
 

Thanks a TON, wemeier! This was exactly what this DBer needed, and in a SUPER fast time frame. Thanks for spreading the knowledge. - W8n
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top