I am trying to run a report from a Form Button based on two criteria;
patient.ID and 1259rec (date)
I can make it work based on the patient.ID but not the date (nor both)
THIS WORKS
Private Sub Command70_Click()
DoCmd.OpenReport "CouponBk", acViewPreview, , "[CouponBk].[fk_patientID]=" & Me.fk_patientID
End Sub
THIS DOESN'T
Private Sub Command70_Click()
DoCmd.OpenReport "CouponBk", acViewPreview, , "[CouponBk].[fk_patientID]=" & Me.fk_patientID And "[CouponBk].[1259rec]=" & Chr(34) & Me.1259rec.Value & Chr(34)
End Sub
Any suggestions?
Thanks
patient.ID and 1259rec (date)
I can make it work based on the patient.ID but not the date (nor both)

THIS WORKS
Private Sub Command70_Click()
DoCmd.OpenReport "CouponBk", acViewPreview, , "[CouponBk].[fk_patientID]=" & Me.fk_patientID
End Sub
THIS DOESN'T
Private Sub Command70_Click()
DoCmd.OpenReport "CouponBk", acViewPreview, , "[CouponBk].[fk_patientID]=" & Me.fk_patientID And "[CouponBk].[1259rec]=" & Chr(34) & Me.1259rec.Value & Chr(34)
End Sub
Any suggestions?
Thanks