dbTalk Databases Forums  

Formatting combo box drop-down list

comp.databases.ms-access comp.databases.ms-access


Discuss Formatting combo box drop-down list in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Arsene@selenium.net
 
Posts: n/a

Default Formatting combo box drop-down list - 03-16-2011 , 03:42 PM






Hello, everyone,

Have a Microsoft Access 2003 form with a combo box used as a record
selector. The combo box "Row Source" is a table field containing SSN.
Setting the combo box format to @@@-@@-@@@@ displays them in the
standard xxx-xx-xxxx format, however, the combo box's drop dow list
shows only a list of unformatted 9 digit strings, which is a tad more
difficult to read. Is there a way to apply formatting to the contents
of the combo box drop down list?

Thanks

Reply With Quote
  #2  
Old   
Marshall Barton
 
Posts: n/a

Default Re: Formatting combo box drop-down list - 03-16-2011 , 10:04 PM






Arsene (AT) selenium (DOT) net wrote:
Quote:
Have a Microsoft Access 2003 form with a combo box used as a record
selector. The combo box "Row Source" is a table field containing SSN.
Setting the combo box format to @@@-@@-@@@@ displays them in the
standard xxx-xx-xxxx format, however, the combo box's drop dow list
shows only a list of unformatted 9 digit strings, which is a tad more
difficult to read. Is there a way to apply formatting to the contents
of the combo box drop down list?

Change the combo box's RowSource to a query that includes
the SSN and a calculated field that formats the SSN:
FormattedSSN: Format(SSN, "@@@-@@-@@@@")

Then set the combo box properties:
ColumnCount 2
BoundColumn 1
ColumnWidths 0;

This way the formatted SSN wil be displayed in the drop
list, but the unformatted SSN will be the combo box's value
so you can use it to search for matching recods.

--
Marsh

Reply With Quote
  #3  
Old   
Arsene@selenium.net
 
Posts: n/a

Default Re: Formatting combo box drop-down list - 03-17-2011 , 03:27 PM



On Wed, 16 Mar 2011 23:04:20 -0500, Marshall Barton
<marshbarton (AT) wowway (DOT) com> wrote:

Quote:
Arsene (AT) selenium (DOT) net wrote:
Have a Microsoft Access 2003 form with a combo box used as a record
selector. The combo box "Row Source" is a table field containing SSN.
Setting the combo box format to @@@-@@-@@@@ displays them in the
standard xxx-xx-xxxx format, however, the combo box's drop dow list
shows only a list of unformatted 9 digit strings, which is a tad more
difficult to read. Is there a way to apply formatting to the contents
of the combo box drop down list?


Change the combo box's RowSource to a query that includes
the SSN and a calculated field that formats the SSN:
FormattedSSN: Format(SSN, "@@@-@@-@@@@")

Then set the combo box properties:
ColumnCount 2
BoundColumn 1
ColumnWidths 0;

This way the formatted SSN wil be displayed in the drop
list, but the unformatted SSN will be the combo box's value
so you can use it to search for matching recods.
You are indeed the man, Marshall.

Thanks !!!!!!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.