tags:

views:

31

answers:

1

In Microsoft access 03.I am creating a database and want the user to have the option of two critera. Critera 1, the output on the report is filtered by accounts that have a varinace of >=10% or <=-10%. Or, Critera 2, allow the user to be able to input a specific variance on a form, that will only output on a report accounts that have that specific variance.

+1  A: 

If you are using a form to collect the variance anyway, then have two reports: the 10% report and a specific variance report.

Then the user will use the form to launch the report. If they enter a specific variance then show the specific variance report. If they use the default then show the 10% report.

Michael Rodrigues
@Edmond It is also possible to create an SQL string in VBA and use that to create/change the query the report is based on. Depending on your version of Access, it may also be possible to use the Where argument of the OpenReport method of DoCmd. The important thing is the form that Michael Rodriguez mentions.
Remou
Rather than changing the stored QueryDef, you can change the report's Recordsource in its OnOpen event based on values drawn from a form where the user has chosen the criteria.
David-W-Fenton