Hi,
Im confused about the results a report is showing.
I open the report with a filter;
What happens is:
when the variable dtDatum = 2-1-2005. It should NOT return the records > 2-1-2005.
BUT is DOES show records in the report like 4-1-2005
.
in the immediate window:
?strWhereCondition
Betaald = 0 AND DatumBetAangemaakt < #02-01-2005#
?#4-1-2005# < #2-1-2005#
False (ofcourse)
What Im I doing wrong?
Appreciate your thoughts
Al
Im confused about the results a report is showing.
I open the report with a filter;
Dim strWhereCondition As String
Dim dtDatum As Date
dtDatum = Date - gbtBetaalTermijn
strWhereCondition = "Betaald = 0 AND DatumBetAangemaakt < #" & dtDatum & "#"
DoCmd.OpenReport "RBetalingen", acPreview, , strWhereCondition
Dim dtDatum As Date
dtDatum = Date - gbtBetaalTermijn
strWhereCondition = "Betaald = 0 AND DatumBetAangemaakt < #" & dtDatum & "#"
DoCmd.OpenReport "RBetalingen", acPreview, , strWhereCondition
What happens is:
when the variable dtDatum = 2-1-2005. It should NOT return the records > 2-1-2005.
BUT is DOES show records in the report like 4-1-2005

in the immediate window:
?strWhereCondition
Betaald = 0 AND DatumBetAangemaakt < #02-01-2005#
?#4-1-2005# < #2-1-2005#
False (ofcourse)
What Im I doing wrong?
Appreciate your thoughts
Al