Date criteria syntax
sorry for the double post.
I think I got it. I used the following for the where and
can change the where in my sql according to my if statement
Between DateAdd("d",-90,Now()) And Now()
Thanks anyway!
Ginger
-----Original Message-----
My last post did not appear, so here it is again.
I get an error on the "short date" format. Any suggestions?
sSQL = "TRANSFORM Sum(qryBillingSummary.Hrs) AS SumOfHrs " _
& "SELECT qryBillingSummary.Name,
qryBillingSummary.MedRecNum, " _
& "qryBillingSummary.AdmitDate,
qryBillingSummary.Diagnosis, " _
& "qryBillingSummary.PlanName " _
& "FROM qryBillingSummary " _
& "WHERE qryBillingSummary.AdmitDate between bdate and
edate " _
& "GROUP BY qryBillingSummary.Name,
qryBillingSummary.MedRecNum, " _
& "qryBillingSummary.AdmitDate,
qryBillingSummary.Diagnosis, " _
& "qryBillingSummary.PlanName " _
& "PIVOT Format([AdmitDate],"short date")"
Thank you in advance!
Ginger
.
|