Switch Board and forms

M

Mr Johnson

Hello, I need some assistance on Switch board and forms. I have a data base
that I created a querys and would like to run them from the Switch board.
When on
Highlight or selected by a single click or douple click it runs the select
report.

Johnson II Johnson ESG Inc.
 
B

Barry Gilbert

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
 
M

Mr Johnson

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
 
B

Barry Gilbert

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
 
M

Mr Johnson

I try that, but it is coming back with a statement: "Procedure declaration
dose not match description of event or procedure having the somae name"
I don't understand what is going on.


--
Johnson II Johnson ESG Inc.


Barry Gilbert said:
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

Mr Johnson said:
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
 
B

Barry Gilbert

My code was an example. You'lll need to replace [FormName] with the name of
your form and [ListBoxName] with the name of your listbox.

Mr Johnson said:
I try that, but it is coming back with a statement: "Procedure declaration
dose not match description of event or procedure having the somae name"
I don't understand what is going on.


--
Johnson II Johnson ESG Inc.


Barry Gilbert said:
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

Mr Johnson said:
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
 
M

Mr Johnson

Thank You, but things are not coming out correct.

"Procedure declaration does not match description of event or procedure have
event same name!"

Action Fail
Macro Name:
Royalty Result Reporting Ist.Minisoft: On Dbl Click

Condition:
True

Action Name:
Open Query

Argument:
=[Form]![Switch Board Royalty]![Vendor]

Help!!!

Johnson II Johnson ESG Inc.


Barry Gilbert said:
My code was an example. You'lll need to replace [FormName] with the name of
your form and [ListBoxName] with the name of your listbox.

Mr Johnson said:
I try that, but it is coming back with a statement: "Procedure declaration
dose not match description of event or procedure having the somae name"
I don't understand what is going on.


--
Johnson II Johnson ESG Inc.


Barry Gilbert said:
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
 

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