am just new in using ms access. i'm using ms access 2010. can you please help me fix this open report where clause?
whenever i run it separately like this:
DoCmd.OpenReport "rptDaily", acViewPreview, , "ReportDate = #" & txtDate.Value & "#"
DoCmd.OpenReport "rptDaily", acViewPreview, , "ReportTime Between #" & cmbHrsFrom.Value & "# And #" & cmbHrsTo.Value & "#"
this two run perfectly on it's own, but when i try to combine them by just adding "and" it's having "Run time error "13" type mismatch". i have also read some other solutions here but whenever i try something it also returns that message.
DoCmd.OpenReport "rptDaily", acViewPreview, , "ReportDate = #" & txtDate.Value & "#" And "ReportTime Between #" & cmbHrsFrom.Value & "# And #" & cmbHrsTo.Value & "#"
can you guys please help this noob. thank you!
whenever i run it separately like this:
DoCmd.OpenReport "rptDaily", acViewPreview, , "ReportDate = #" & txtDate.Value & "#"
DoCmd.OpenReport "rptDaily", acViewPreview, , "ReportTime Between #" & cmbHrsFrom.Value & "# And #" & cmbHrsTo.Value & "#"
this two run perfectly on it's own, but when i try to combine them by just adding "and" it's having "Run time error "13" type mismatch". i have also read some other solutions here but whenever i try something it also returns that message.
DoCmd.OpenReport "rptDaily", acViewPreview, , "ReportDate = #" & txtDate.Value & "#" And "ReportTime Between #" & cmbHrsFrom.Value & "# And #" & cmbHrsTo.Value & "#"
can you guys please help this noob. thank you!