In your listbox, you'll have the list of query or report names. In the
double-click event, call the macro you created earlier. Instead of specifying
the query name in the macro, refer to the form's listbox. In the QueryName
box in the macro, put
=[Forms]![FormName]![ListBoxName]
Be sure to include the equal sign at the beginning. The macro will open
whatever query is selected in the listbox.
Barry
:
That was helpful, but I have a list of query names, I want to but in a
listbox,(iAnywhere, Softtrax, IBM, Microsft etc.) I would like to link the
names to the query report Example: iAnywhere (name) to iAnywhere (query), to
open in the Switch board when the name is highlight/select or double click
on. Once Click the Report or query will run.
Thank You
--
Johnson II Johnson ESG Inc.
:
In design view of the form, select the button you want to open the
report. On the Events tab of the property sheet, select the On Click
event and click the elipsis (...) button to the right. Choose "Macro
Builder". Name your macro something like OpenMyReport. On the first
line, in the Action column, select OpenReport. At the bottom of the
macro builder, select the name of the report you want to have this
open. Close and save the macro.
When you click the button, the report should open.
HTH,
Barry