TommyIndigo
Programmer
I have a customer inquiry form that is read-only. My client wants to be able to basically filter by selection using combo boxes (and not Access' filter by selection buttons). Unfortunately, he specifically wants to do this with ONE form (not have a separate form to gather parameters). Also, he wants every field to have this functionality (otherwise, I'd try a form/subform solution).
I'm attempting to have the After Update event perform the following:
1. store filter string based on new value in NAME field
2. Undo the name field, so it doesn't change the current record
3. Re-open the form, using the new filter
Since I am dynamically changing the FILTER property on the form, I am successfully able to see that the string propagated correctly. However, the filter never finds any records...which makes no sense to me.
Here is my code:
Private Sub Name_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInquiryMain"
stLinkCriteria = "[Name]=" & "'" & Me![Name] & "'"
Me.Undo
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
If anyone has any suggestions, it would be MOST appreciated!!
Thanks,
Tom
I'm attempting to have the After Update event perform the following:
1. store filter string based on new value in NAME field
2. Undo the name field, so it doesn't change the current record
3. Re-open the form, using the new filter
Since I am dynamically changing the FILTER property on the form, I am successfully able to see that the string propagated correctly. However, the filter never finds any records...which makes no sense to me.
Here is my code:
Private Sub Name_AfterUpdate()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInquiryMain"
stLinkCriteria = "[Name]=" & "'" & Me![Name] & "'"
Me.Undo
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
If anyone has any suggestions, it would be MOST appreciated!!
Thanks,
Tom