Format a combobox list as a heirarchy...?

B

blueinc

I have a table that has a primary key and a parentKey column. I'm using it as
a Combo Box in the Lookup of a field in another Table. Right now, the
dropdown list is formatted normally, like this:
Program1 | Process1
Program1 | Process2
Program1 | Process3
Program2 | Process1
Program2 | Process2

Is there an easy way to make it look like this:
Program1 | Process1
- | Process2
- | Process3
Program2 | Process1
- | Process2
 
J

Jeff Boyce

Brian

?"in a table"?

Are you saying that you are using a lookup field data type in a table? You
posted in a "forms" newsgroup.

I'm not aware of a way to modify how a combobox displays its data, but maybe
you could find a solution at S. Lebans' website.

Is there a reason you aren't using a pair of comboboxes (i.e., "cascading
comboboxes")?

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
B

blueinc

I have two tables. The 'backend' table is called ProgramProcesses and is
structured heirarchly using a parentID and a primary key. It all works and
looks like the first example below.
The 'frontend' table has a field in it called Program that stores the
foreign key to the ProgramProcesses table. That Program field has its Lookup
tab Display Control set to Combo Box. That Combo Box's Row Source is a SELECT
of the ProgramProcesses' primary key and Name. It currently does what it's
supposed to do.
I wondered if there was a way to display the dropdown differently: more like
the second example below.
To answer my own question now: I added a field in ProgramProcesses called
'Display', added in the text (with hyphens and spaces, etc) that I wanted to
show and called that in the Combo Box's Row Source SELECT instead of the Name
field. Seems good now.
Thanks for your response!
cheers...B
 

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