organize a combobox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combobox that lists forms to open and does so via an after update
event. Here is the combobox:

SELECT tblProfileTypes.Description, tblProfileTypes.Class,
tblProfileTypes.txtProfileType
FROM tblProfileTypes
ORDER BY tblProfileTypes.Class, tblProfileTypes.Description;

How can I organize the combobox into categories? What I'd like to do is have
all of the Descriptions that are of the "PK" Class be listed under a "PK"
header and all of the Descriptions that are of the "MZ" Class be listed under
a "MZ" header, etc.

I've seen a thread in the past where someone did something similar to this
but I can't find it.

Thanks for your help!
 
One possibility is to have one extra combobox where you select the class (MZ
or PK). Then, on the after update event on this combobox you do a requery on
the 2nd combobox. The 2nd combobox will then have a rowsource like this:

SELECT tblProfileTypes.Description, tblProfileTypes.Class,
tblProfileTypes.txtProfileType FROM tblProfileTypes where class =
me.combobox1.column(0)

Regards

Tore
 
Back
Top