Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2005

Tip: Looking for answers? Try searching our database.

Combo Box Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James C. - 28 Jan 2005 22:11 GMT
I currently have a combo box that pulls information from one of my master
tables. The combo box pulls citys but it also allows the user to pull the
state. Ex.
-----
ARIZONA
CALIFORNIA
PHX
TUS
SFO
SAN
etc...

Is there a way to BOLD or Change the font/color of certain entries in my
combo box such as the States?
Douglas J. Steele - 28 Jan 2005 22:25 GMT
Not as far as I'm aware.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I currently have a combo box that pulls information from one of my master
> tables. The combo box pulls citys but it also allows the user to pull the
[quoted text clipped - 10 lines]
> Is there a way to BOLD or Change the font/color of certain entries in my
> combo box such as the States?
B. Comrie - 29 Jan 2005 07:39 GMT
Try putting the States in a different table from the Cities, this will
enable accurate reports in the future and you wouldn't need to bold only
certain items.

BComrie
http://www.codewidgets.com

> I currently have a combo box that pulls information from one of my master
> tables. The combo box pulls citys but it also allows the user to pull the
[quoted text clipped - 10 lines]
> Is there a way to BOLD or Change the font/color of certain entries in my
> combo box such as the States?
John Nurick - 29 Jan 2005 10:46 GMT
As Doug says, the standard Access combobox won't do this. In theory you
could use an ActiveX "owner draw" combobox control. Owner draw means you
have full control over how each item in the list is formatted. But it
would be quite a lot of work, and would complicate the process of
packaging and distributing your application.

For a simple alternative, how about using a couple of spaces to indent
the cities but not the states? For instance, if your table has a
Location field containing the state name or city abbreviation, and an
IsState yes/no field distinguishing cities from states, you'd use
something like

 SELECT
   Location,
   IIF([IsState],[Location],"  "&[Location]") AS ListItem
 FROM tblLocations
 ORDER BY Location
 ;

in a two-column combobox with the ColumnWidth property set to "0" and
the BoundColumn to 1.

>I currently have a combo box that pulls information from one of my master
>tables. The combo box pulls citys but it also allows the user to pull the
[quoted text clipped - 10 lines]
>Is there a way to BOLD or Change the font/color of certain entries in my
>combo box such as the States?

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.