I'm trying to use WHERE condition of the DoCmd.OpenReport method without much luck. The users can enter 'from' and 'to' dates onto a form, which I am trying to use with the WHERE condition. The syntax I am using is as follows:
DoCmd.OpenReport "repName", acViewPreview, , "WriteOffDate >" & Me.txtFrom & "And WriteOffDate < " & Me.txtTo
I have tried variations on the above, but can either get the report to return a) no records at all or b) all of the records in the underlying table
Please can anyone help!
DoCmd.OpenReport "repName", acViewPreview, , "WriteOffDate >" & Me.txtFrom & "And WriteOffDate < " & Me.txtTo
I have tried variations on the above, but can either get the report to return a) no records at all or b) all of the records in the underlying table
Please can anyone help!