G
Guest
I am filtering a recordset to obtain a single report. This is my code:
Dim datConsultDate As Date
Dim lngPatientID As Long
datConsultDate = CDate(Forms!frmConsultation!txtConsultDate)
lngPatientID = Me!PatientID
DoCmd.OpenReport "rptReferralLetter", acViewPreview, , "[PatientID] = " &
lngPatientID & " And [ConsultDate] = #" & datConsultDate & "#"
I'm getting a run time error 3079 and 'Reserved error'
Any help greatly appreciated.
Sandy
Dim datConsultDate As Date
Dim lngPatientID As Long
datConsultDate = CDate(Forms!frmConsultation!txtConsultDate)
lngPatientID = Me!PatientID
DoCmd.OpenReport "rptReferralLetter", acViewPreview, , "[PatientID] = " &
lngPatientID & " And [ConsultDate] = #" & datConsultDate & "#"
I'm getting a run time error 3079 and 'Reserved error'
Any help greatly appreciated.
Sandy