If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

How do I make a button on a form to open a specific report, run a specific querey?

I copied a button from the Northwind example and edited the onClick property, but it didnt work!

Code:

=OpenForms("Reservist Profile Currently On Orders")

Of course it didnt. Have you considered using a basic Macro?

Hit F11
Objects>Macros>New Macro> Under Action within the drop down>OpenReport> Report Name: Find the name of the report you have made.> View: Print Preview

Save the Macro as "Your Databases Name>Macro>Open Report>Report Name" (I suggest you follow this format as it makes things less confusing in the end when your list of Macros grow.)

1. Go back to your form.
3. On the Toolbar at the top hit View>Design View
2. Right click on your button.
3. Select properties.
4. Click the event tab.
5. Look for "On click.................." Click the field to the right.
6. Within the drop down you will see the name of your Macro that you made.
7. Click the Macro name.
8. Close the Properties box.
9. Go back to View>Form View
10. Click your new button and your report should show up in Print Preview.