something is going wrong can you explain at my level and be more
specific as i am New to Access and learning .
If you are a newbie, the best method is to
1) Create a query that you will use in the report.
2) Use the Report wizard to create the report template.
3) Create a form to call the report.
I usually like to create a query that does little filtering for a
report. It is irrelevent in sorting the query...that's done in the
Report under the menu item View/Sorting&Grouping. The query should
produce most (if you don't have calced fields) the columns you want.
In your case your query would be a Pivot/Crosstab.
Once the report is created using the wizard, put in the finishing
touches, move/size the fields, etc.
Now create a form. You might want a from and to date. You might
want
to select by client or employee. Whatever fields you want to filter
on
put in.
Now, I have a command button for calling the report. I might do
something like this.
Dim strFilter As String
If Not IsNull(Me.FromDate) Then
strFilter = strFilter & "DateFld #" & Me.FromDate & "# And
"
endif
If Not IsNull(Me.ToDate) Then
strFilter = strFilter & "DateFld < #" & Me.ToDate & "# And "
endif
If Not IsNull(Me.ProductType) Then
strFilter = strFilter & "ProductID = " & Me.ProductID & " And
"
endif
etc.....
'Remove the And at the end of the string
strFilter = Left(strFilter,Len(strFilter) - 5)
'Call the report
Docmd.OpenReport "YourReportName",acViewPreview,,strFilter