G
Guest
Hi,
I built a report based on a query. Now, I need to add two parameters to the
query that the user will provide when he uses the application.
In VBA, I can build the complete Where clause and use it in the
DoCmd.OpenReport command.
I was wandering if it would be better to use a FilterName parameter rather
than a WhereCondition in the DoCmd.OpenReport command.
The WhereCondition I build is the following:
strWhere = "tblFollowUp.DateSpecialComitee>=#" & datStart & _
"# And tblFollowUp.DateSpecialComitee<#" & datEnd & "#"
Then, I thought of using this code:
DoCmd.OpenReport "rptStatReport", _
acViewPreview, , strWhere, acWindowNormal
My question is: is it better (or more effective) to use the FilterName or
the WhereCondition (2 parameters of the DoCmd.OpenReport command) in my case?
For some reason, it does not work and Access is closed when I use this code.
I use Access 2000 in Windows XP Pro.
Thanks.
I built a report based on a query. Now, I need to add two parameters to the
query that the user will provide when he uses the application.
In VBA, I can build the complete Where clause and use it in the
DoCmd.OpenReport command.
I was wandering if it would be better to use a FilterName parameter rather
than a WhereCondition in the DoCmd.OpenReport command.
The WhereCondition I build is the following:
strWhere = "tblFollowUp.DateSpecialComitee>=#" & datStart & _
"# And tblFollowUp.DateSpecialComitee<#" & datEnd & "#"
Then, I thought of using this code:
DoCmd.OpenReport "rptStatReport", _
acViewPreview, , strWhere, acWindowNormal
My question is: is it better (or more effective) to use the FilterName or
the WhereCondition (2 parameters of the DoCmd.OpenReport command) in my case?
For some reason, it does not work and Access is closed when I use this code.
I use Access 2000 in Windows XP Pro.
Thanks.