Filtering

  • Thread starter Thread starter Stefan
  • Start date Start date
S

Stefan

I would like to filter a report in the property box in
design mode.

I would like the report to return only data from 2004. I
tried entering the following but got a syntax error.

[InvFrom] =between #1/1/2004# and #12/31/2004#
Field name on report


In the filter the help field said I should use a where
clause without the where.

Does anybody know the proper syntax?

Thanks in advance
 
I don't ever use the filter property from design mode but I expect your
syntax would need to be:
Filter: [InvFrom] Between #1/1/2004# and #12/31/2004#
 
I would like to make a different report for each year
without making a different query. This seemed like the
solution. Any other ideas?
-----Original Message-----
I don't ever use the filter property from design mode but I expect your
syntax would need to be:
Filter: [InvFrom] Between #1/1/2004# and #12/31/2004#

--
Duane Hookom
MS Access MVP


I would like to filter a report in the property box in
design mode.

I would like the report to return only data from 2004. I
tried entering the following but got a syntax error.

[InvFrom] =between #1/1/2004# and #12/31/2004#
Field name on report


In the filter the help field said I should use a where
clause without the where.

Does anybody know the proper syntax?

Thanks in advance


.
 
Different reports for different years sounds like a nightmare. I always open
reports from code. The code will generally provide a "where clause" if I
want to filter the report. The values in the where clause come from controls
on forms. For instance:

Dim strWhere as String
strWhere = "Year([InvoiceDate]) = " & Me.cboYear
DoCmd.OpenReport "rptInvoices", acPreview, , strWhere

--
Duane Hookom
MS Access MVP


Stefan said:
I would like to make a different report for each year
without making a different query. This seemed like the
solution. Any other ideas?
-----Original Message-----
I don't ever use the filter property from design mode but I expect your
syntax would need to be:
Filter: [InvFrom] Between #1/1/2004# and #12/31/2004#

--
Duane Hookom
MS Access MVP


I would like to filter a report in the property box in
design mode.

I would like the report to return only data from 2004. I
tried entering the following but got a syntax error.

[InvFrom] =between #1/1/2004# and #12/31/2004#
Field name on report


In the filter the help field said I should use a where
clause without the where.

Does anybody know the proper syntax?

Thanks in advance


.
 
Back
Top