J
John B
Hi,
I would like to filter a report based on both
- OrderID
- DataRange
Here part of the code. I am Ok with OrderID filter, but when I try to add
the DataRange I got run-time error 3075 and a sintax error: missing
operator.
Can you please help me to understand where am I wrong?
Dim DataRange As String
DataRange = "[DataOrder] Between #" & [Forms]![frmReport]![txtdatefrom] & "#
And #" & [Forms]![frmReport]![txtDateTo] & "#"
rpt.Filter = "[OrderID]=" & ![OrderID] & DataRange
rpt.FilterOn = True
DoCmd.Close , , acSaveYes
Thanks and Regards
John
I would like to filter a report based on both
- OrderID
- DataRange
Here part of the code. I am Ok with OrderID filter, but when I try to add
the DataRange I got run-time error 3075 and a sintax error: missing
operator.
Can you please help me to understand where am I wrong?
Dim DataRange As String
DataRange = "[DataOrder] Between #" & [Forms]![frmReport]![txtdatefrom] & "#
And #" & [Forms]![frmReport]![txtDateTo] & "#"
rpt.Filter = "[OrderID]=" & ![OrderID] & DataRange
rpt.FilterOn = True
DoCmd.Close , , acSaveYes
Thanks and Regards
John