Run a formatted report with seperate queries by creating seperate command buttons
Posted on 2006-03-22
I want to have an Access form from which I can run a report (Report1) using Query1 which will filter for all of the records created in a given year (for instance) by hitting CommandButton1 and then have another Command Button (CommandButton2) run Report1 with Query2 which will list all of the records sorted in Ascending date order and so forth. In effect, I want to eliminate the need to have several copies of the same report which need to be update every time the format of the report needs to change.
How do I select the query with code of the command button rather than in the Record Source on properties page of the report while in design view?