AJS
11-30-2004, 11:09 PM
Hi,
I am having some difficulty getting the following code fragment to work:
Private Sub Combo10_Change()
Dim FormFilter As String
Dim FiltField As String
Dim FiltCrit As String
If Form_Table1.Combo10.Value = "Joe" Then
FiltField = "Name"
FiltCrit = "Name=Joe"
FormFilter = BuildCriteria(FiltField, dbText, FiltCrit)
Else
FormFilter = ""
End If
Form_Table1.Filter = FormFilter
Form_Table1.FilterOn = True
End Sub
Basically, when this runs it brings up a dialog box that is captioned "Joe", rather than automatically filtering for names = Joe. I use a comparable syntax for boolean and date filters, and they seem to work fine, but for some reason this doesn't work smoothly for text fields.
Thanks, Aaron.
I am having some difficulty getting the following code fragment to work:
Private Sub Combo10_Change()
Dim FormFilter As String
Dim FiltField As String
Dim FiltCrit As String
If Form_Table1.Combo10.Value = "Joe" Then
FiltField = "Name"
FiltCrit = "Name=Joe"
FormFilter = BuildCriteria(FiltField, dbText, FiltCrit)
Else
FormFilter = ""
End If
Form_Table1.Filter = FormFilter
Form_Table1.FilterOn = True
End Sub
Basically, when this runs it brings up a dialog box that is captioned "Joe", rather than automatically filtering for names = Joe. I use a comparable syntax for boolean and date filters, and they seem to work fine, but for some reason this doesn't work smoothly for text fields.
Thanks, Aaron.