ADH paired listbox formatting

P

Piet Linden

I am working on a A2003 database that includes the listbox solution
for selecting objects in the database. I am using the option to fill
the listboxes with values from a collection, which works fine.

The problem I am having is that I want to put the objects in a group
or section (because I am exporting the results to Word as a report of
sorts). I can include "Group" names, but I can't figure out any way
of distinguishing the group names from the query names visually.
Right now I am prepending dashes to section names when I add them to
the listbox, so the list looks like this

---Section1
Query1
Query3
---Section2
Query2

etc

I'm not crazy about the solution. It works okay, but I was just
wondering if there were any other way of making the sections stand
out.... well, I guess I could use all caps, but other than that, I'm
out of ideas.

Any thoughts on how to make it work and not look really ugly? (Well, I
guess besides using a different kind of control?)

Thanks,
Pieter
 
C

Clifford Bass

Hi Pieter,

How about a two-column list box?

Section1 Query1
Section1 Query3
Section2 Query2

You could even add the dashes if you want to make the grouping more
obvious:

Section1 Query1
Section1 Query3
---------- --------
Section2 Query2

Clifford Bass
 
P

Piet Linden

Hi Pieter,

     How about a two-column list box?

Section1       Query1
Section1       Query3
Section2       Query2

     You could even add the dashes if you want to make the groupingmore
obvious:

Section1       Query1
Section1       Query3
----------       --------
Section2       Query2

                       Clifford Bass








- Show quoted text -

Clifford,

Thanks for the response. Not sure it would work with two columns.
The code works by creating two collections, one for each listbox, and
then the code adds the selected item to the other listbox and then
removes it from the original listbox. So I'm not sure how it would
handle the moving of items back and forth if there were two columns in
each list. The part I liked about the paired multi-select listboxes
is that the two together provide exactly the functionality I need with
that one minor issue. That's why I prepended a few dashes to the
section names... I guess I could just switch it around and put them
in front of the query names... shouldn't matter - I can snip them off
easily enough. Might have to check Stephen Lebans's site and see if
he has a subclassed listbox that allows formatting of individual
items... Other than that, I'm outta ideas.

Pieter
 
C

Clifford Bass

Hi Pieter,

I am not quite grasping what exactly is going with your system. What
are the relevant parts and what is the goal here? I am guessing it is to
provide the user with a way to select/deselect certain items by moving them
from one list box to another list box? The resulting list then being used to
choose rows for inclusion in a report? All the while keeping the groupings
in both lists? If you wish to pursue further ideas, give a fuller
description of what is going on. Maybe include a specific example.

Clifford Bass

Clifford Bass
 
P

Piet Linden

Hi Pieter,

     I am not quite grasping what exactly is going with your system..  What
are the relevant parts and what is the goal here?  I am guessing it is to
provide the user with a way to select/deselect certain items by moving them
from one list box to another list box?  The resulting list then being used to
choose rows for inclusion in a report?  All the while keeping the groupings
in both lists?  If you wish to pursue further ideas, give a fuller
description of what is going on.  Maybe include a specific example.

                Clifford Bass

                    Clifford Bass

Figured it out... just had my brain in backwards. Basically, instead
of "indenting" the section names by prepending Space(5) to the section
names, do it to the query names, and then strip off the spaces before
processing the query. Should work fine, because ADO will throw a fit
if there are spaces in object names, because it interprets them as a
second recordsource.
 

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