G
Guest
Im attempting to open a report based on user input. Which report to open is
based on a combo box and that worked fine until I added a start and end date
at which point, no matter what date range I enter, it is returning nothing.
Here is my code, what am I doing wrong?
Dim stLinkCriteria As String
Dim stDocName As String
If [Combo7] = "Recalls" Then stDocName = "RecallReport"
If [Combo7] = "Corporate Projects" Then stDocName = "CorporateReport"
If [Combo7] = "Return to Vendor" Then stDocName = "RTVreport"
stLinkCriteria = "[DateIssueFound] > " & Me![Start] & " and
[DateIssueFound] < " & Me![End]
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
based on a combo box and that worked fine until I added a start and end date
at which point, no matter what date range I enter, it is returning nothing.
Here is my code, what am I doing wrong?
Dim stLinkCriteria As String
Dim stDocName As String
If [Combo7] = "Recalls" Then stDocName = "RecallReport"
If [Combo7] = "Corporate Projects" Then stDocName = "CorporateReport"
If [Combo7] = "Return to Vendor" Then stDocName = "RTVreport"
stLinkCriteria = "[DateIssueFound] > " & Me![Start] & " and
[DateIssueFound] < " & Me![End]
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria