List Box

J

Jasper Recto

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?

Thanks,
Jasper
 
S

Steve Schapel

Jasper,

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
[NameOfYourListbox].[Column](2)
(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
property!)
 

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