List Box

List Box

Post by Jasper Rec » Fri, 05 Nov 2004 01:37:06

I have a list box that lists out names of reports that can be run. It is
linked to a table that has 3 fields.
Report Description
Report Name
Report Path

I have a button that executes a shell command that runs the program that the
reports are in.

How do I link the list box to the button? I want to be able to pass the
report name and report path to the button. The shell command is already
written to accept a generic report name and path but how do get the button
to know which item in the list box is selected?


List Box

Post by Steve Scha » Fri, 05 Nov 2004 03:01:02


Your listbox has a Bound Column property. Whichever of your 3 columns
is indicated will define the value of the listbox. So, for example, if
the bound column is 2, you just have to refer to the Listbox control for
the Report Name, and then the Report Path would be retrieved from
(This is confusing, in that the columns are numberes 1, 2, 3 for the
Bound Column property, but they are numbered 0, 1, 2 for the Column
Steve Schapel, Microsoft Access MVP