bostonfrog
Programmer
I have a problem with a form which will open a second form and filter it on the criteria below. The behavior of the form that is being opened doesn't always filter, though, and I'm not sure why.
Code in command button:
When this button behaves correctly, it displays the form with the number of records filtered in the record navigation bar, e.g. 2 records (Filtered), based on the client's ID and purchase date, for example. But mostly it's not working, and goes to the first record in the recordset of the form that's being opened. Any ideas?
Code in command button:
Code:
Dim LinkCriteria As String
LinkCriteria = "[ID] & [Date]= " & "'" & Me![ID] & Me![Date] & "'"
DoCmd.OpenForm "FormName", acNormal, , LinkCriteria
When this button behaves correctly, it displays the form with the number of records filtered in the record navigation bar, e.g. 2 records (Filtered), based on the client's ID and purchase date, for example. But mostly it's not working, and goes to the first record in the recordset of the form that's being opened. Any ideas?