Go Back   Access World Forums > Microsoft Access Discussion > Macros

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-11-2001, 10:06 AM   #1
elektro
Guest
 
Posts: n/a
Using macro to make command buttons perform queries and reports

I'm seeking some sample code to teach me how to use a macro with queries and reports.

example

take a command button in a form
and make it open up a report or report queries.

HELP!
thanks, pAul

  Reply With Quote
Old 06-12-2001, 07:24 AM   #2
tcraton
Guest
 
Posts: n/a
To use a command button to open a report, do the following:

1)Select command button from the toolbar and place it on your form;
2)Right click on command button and select "properties";
3)In the command buttom properties window, go to "On Click", and select "Macro Builder."
4)Once you are in the Macro Builder screen, on the first line, select "Run Command." At the bottom of your screen you will then seen a single field drop-down - scroll down until you find "Refresh" - select it.
5) On the second line in your macro, select "Open Report." Once you have done this, go again to the bottom of the screen, and follow the prompts for each field. It will ask you for the report name, and filter/qry used for the report. Answer all the questions, then save your macro.
6) Exit out of the macro builder, and give it a try.
  Reply With Quote
Old 09-25-2016, 11:03 PM   #3
Fenderrick
Newly Registered User
 
Join Date: Sep 2016
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Fenderrick is on a distinguished road
Re: Using macro to make command buttons perform queries and reports

Hi. I have the same problem and very new to this.When it asks for query/filter name do you literally type the name of your query and do you put spaces in or type it as one long word

Fenderrick is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 04:56 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World