Subheadings visible inside the combo but not selectable!

Happy YN

Registered User.
Local time
Today, 19:06
Joined
Jan 27, 2002
Messages
425
I have seen a combo made in delphi which looks like this when the dropdon arrow is selected
STATIONS
Waterloo
Euston
Liverpool St
AIRPORTS
Heathrow
Stansted
Gatwick

only the lowercase ones are selectable. If the user selects STATIONS he gets a messagebox telling him its only a heading and unselectable. The row source for this info (in delphi) is
STATIONS:Waterloo;Euston;Liverpool St;AIRPORTS:Heathrow;Stansted;Gatwick

i.e. a colon after each heading but a semicolon after each entry

This does't work as a row source in access but could I get this some other way?
Similarly how does one gert an unckliable greyed out option in the middle of a combo dropdown list?
Thanks
 
Happy,

The ComboBoxes & ListBoxes in Access are pretty rudimentary.
They don't allow for presenting a heirarchical list and they
don't allow for "graying out" individual items. They don't
allow for any differentiation between rows;

You could however put your data example into a ListBox using
the ";" delimiter. It would display in your specified order.
Then you could use the OnClick event, and if the item was
selected AND was UpperCase, you could De-Select it.

Not really un-clickable, but the click doesn't really do
anything.

Wayne
 
Perhaps you could use cascading combo boxes or a tree view control ?

Dave
 
Thanks for your replies! So is access just not as powerful as other programs? I was sure I could imitate it! :(
 
Happy,

Access is VERY adept at allowing for the rapid development of
db applications. Its strong points are the ease with which
you can create/modify tables, develop forms/reports and interact
with other MicroSoft applications. The short amount of time
required to develop a small application can't be touched with
something like VB, C++ or even an integrated package like
ORACLE Forms.

For most apps, the standard combos and list boxes are fine.
There are third-party add-ins that support things like the
shading of individual rows or bolding/colors within text
fields.

Dave's point about the Tree View control might be worth looking
into.

Overall, Access will provide a foundation that is easy to work
with. When it doesn't meet a need such as this, either change
the specs or enlist some third-party software.

Wayne
 
I am very careful with database rules. actually this list is populated with an external ini file but I respect what you say Pat
Thanks for your remarks!
 
Its not an external table. Its one line of an ini which gets pasted straight into the combo control as values . Since its separated by semicolons, each part becomes a different row in the combo!
 
As the form opens it reads an ini to know how to populate those combos. Each line is a different combo. The program is generic. All thats different is the ini. What do you mean 'prevent headings from being selected'? and how do I display them?
Thanks
 
Such as? reading them off tables? Why must everything in access be governed by tables? (polite question)
The ini is maintained by the designer not the user
 

Users who are viewing this thread

Back
Top Bottom