Hello All.
I have a form which displays all customer orders. What I am trying to do is allow a user to enter a starting date and an ending date on another form, and the open my customer orders form based on that range of dates.
My code is as follows:
Dim filterStr As String
Dim formToOpen As String
Private Sub MakeFilter_Click()
formToOpen = "DE Customer Orders"
filterStr = "[ShipDate] Between #" & [Forms]![View Cust Orders by Ship Date]![starting]
filterStr = filterStr + "# And #" & [Forms]![View Cust Orders by Ship Date]![ending] & "#"
Debug.Print filterStr
DoCmd.OpenForm formToOpen, acNormal, filterStr
So far, it simply opens the form, ithout applying the filter.
Any ideas would be greatly appreciated!
Steve
I have a form which displays all customer orders. What I am trying to do is allow a user to enter a starting date and an ending date on another form, and the open my customer orders form based on that range of dates.
My code is as follows:
Dim filterStr As String
Dim formToOpen As String
Private Sub MakeFilter_Click()
formToOpen = "DE Customer Orders"
filterStr = "[ShipDate] Between #" & [Forms]![View Cust Orders by Ship Date]![starting]
filterStr = filterStr + "# And #" & [Forms]![View Cust Orders by Ship Date]![ending] & "#"
Debug.Print filterStr
DoCmd.OpenForm formToOpen, acNormal, filterStr
So far, it simply opens the form, ithout applying the filter.
Any ideas would be greatly appreciated!
Steve