Hi,
I’m trying to open a report between a date range. I’ve used code similar to code given to me from the lounge in the past but keep getting an error message that but I keep getting an error message asking for an end of statement. I know I’m missing a comma or bracket or something but am not sure where it goes. The code works fine until I add in the date related information. The code I’m using is as follows:
DoCmd.OpenReport “rptBatchInvoice”, acViewPreview, , “AccountID = ” & Me.lstBillingHistory & ” _
” And ([DateWorked] Between #” & Me.StartDate & “# And #” & Me.EndDate & “#)”
Me.StartDate and Me.EndDate are both unbound controls on the form that are used to filter the report.
Thanks,
Leesha