R
R
Hi,
I want to open a report with it's data filtered only
displayind dates from 6months ago til now.
Also I want to take only those projects whose project name
is choosen from a combo box.
the part of my code looks like this:
strFilter = "SELECT * FROM tblMain " _
& "WHERE [Von] Between DateAdd(m; -6; Now()) And Now()" _
& " ORDER BY [Von] DESC;"
strSQL = "ProjectName Like Forms!frmFilters!ctlProject"
DoCmd.OpenReport stDocName, acViewPreview, strFilter,
strSQL
---- It do opens only for the selected project name, but
shows all dates for that project and not shows only for
the past 6 months. So I assume the Between DateAdd ... is
not working. Any ideas why ?? What I'm missing? ---
thx,
r
I want to open a report with it's data filtered only
displayind dates from 6months ago til now.
Also I want to take only those projects whose project name
is choosen from a combo box.
the part of my code looks like this:
strFilter = "SELECT * FROM tblMain " _
& "WHERE [Von] Between DateAdd(m; -6; Now()) And Now()" _
& " ORDER BY [Von] DESC;"
strSQL = "ProjectName Like Forms!frmFilters!ctlProject"
DoCmd.OpenReport stDocName, acViewPreview, strFilter,
strSQL
---- It do opens only for the selected project name, but
shows all dates for that project and not shows only for
the past 6 months. So I assume the Between DateAdd ... is
not working. Any ideas why ?? What I'm missing? ---
thx,
r