424,066 Members | 2,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,066 IT Pros & Developers. It's quick & easy.

Opening a report based on multiple criteria

P: n/a
I am trying to open a report based on what the user selects on a form.
Each individual criteria works but when I try to combine to pass
multiple criteria it doesn't. I have read what I can find on here and
tried different suggestions but nothing works. Can somebody take a
look at my code and see what I'm doing wrong?

strDocName = "ColdCallTotalsbyBDM"
strLinkCriteria1 = "[BDM Responsible] = Forms![Form1]![BDM
Responsible]"
strLinkCriteria2 = "[Date Called] >= Forms![Form1]![BeginDate]"
strLinkCriteria3 = "[Date Called] <= Forms![Form1]![EndDate]"
strLinkCriteria = strLinkCriteria1 "And ([Date Called] >= Forms!
[Form1]![BeginDate] And [Date Called] <= Forms![Form1]![EndDate])"
DoCmd.OpenReport strDocName, acViewPreview, , strLinkCriteria
End If
I have also tried strLinkCriteria = strLinkCriteria1 &
strLinkCriteria2 & strLinkCriteria3 but that also does not work.

Aug 21 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.