Just a quick one:
I have this now:
Code:
It runs fine but shows all the dates on the report, not just the ones in the range. CreatedDate is a field on the report and is in shortdate format.
What would be the reason for this?
thanks
Martin
I have this now:
Code:
Code:
Text2.SetFocus
Dim txtdept As String
Dim txtdept2 As String
txtdept = Text2.Text
txtdept2 = "dept='" & txtdept & "'"
dt0 = DTPicker0.Value
fromdate = "'CreatedDate > #" & DTPicker0 & "#'"
todate = "'CreatedDate < #" & DTPicker1 & "#'"
strr = txtdept2 & " AND 'CreatedDate BETWEEN #" & DTPicker0 & "# AND #" & DTPicker1 & "#'"
DoCmd.OpenReport "Copy of inventory transactions - Choose Dept", acViewPreview, , strr
It runs fine but shows all the dates on the report, not just the ones in the range. CreatedDate is a field on the report and is in shortdate format.
What would be the reason for this?
thanks
Martin
Last edited: