R
Rich
Guest
It's much easier to base your form on a query and set the criteria there to reference the form fields.
To use the str criteria on date fields is far more complex, I don't use the between operator but here's an example which uses two conditions, one the CustID and the other a date field.
If you live outside of the US then you also have to to return the dates in the US format, something like
stLinkCriteria = "[Customer]= " & "'" & Me.List23.Column(2) & "'" & "And [Issued]= #" & Format(Me!List23.Column(1), "mm dd yyyy") & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
To use the str criteria on date fields is far more complex, I don't use the between operator but here's an example which uses two conditions, one the CustID and the other a date field.
If you live outside of the US then you also have to to return the dates in the US format, something like
stLinkCriteria = "[Customer]= " & "'" & Me.List23.Column(2) & "'" & "And [Issued]= #" & Format(Me!List23.Column(1), "mm dd yyyy") & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria