April said:
There is a column or
field for each Month such as Jan Sls, Feb Sls, Mar Sls, etc. and there are
$$ values in each column. So, I want to select the monthly columns for each
individual report. Is there possibly a way that I can set up a parameter
criteria to select the columns that I want to show in the report? I am stuck
on this one, please help.
This sounds like a spreadsheet, not a proper database table,
and is the cause of your difficulties.
The answer is No, there is no way to specify criteria to
select specific fields from a table or query. If this is a
crosstab query based on a properly normalized table, then
you would be better off creating a new Totals query that
just selects the desired month for the report.
If you really can't avoid the speadsheet style data, then
you'll have to use code in the report's open event to
construct the report's own record source query. Here's some
example air code to give you the general idea:
mth = Forms!someform.sometextbox
strSQL = "SELECT [" & mth & " Sls] As Sales, " _
& "[" & mth & " GP] As GP"
FROM yourquery
Me.RecordSource = strSQL
The report text boxes can then be bound to the Sales and GP
fields in the query without being aware of which month was
selected.