organize a combobox

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!
 
T

Tore

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top