J
JamesJ
I'm trying to filter a form with a listbox based on text typed into an
unboun text box.
I type the text and then click the filter button that has the following
code:
If IsNull(Me!txtFilterName) Then
MsgBox "Cannot apply filter, text required!", vbOKOnly, "Filter Info"
Me!txtFilterName.SetFocus
Else
If Me.Dirty Then Me.Dirty = False 'Save first.
Me.Filter = "[CdTitle] Like ""*" & Me.txtFilterName & "*"""
Me.FilterOn = True
Me!lstCd.RowSource= Me.RecordSource
Me!txtFilterName.SetFocus
End If
I'm attempting to synch the form and the list box with this line:
Me!lstCd.RowSource= Me.RecordSource
Buit it isn't working.
Any help will be appreciated.
James
unboun text box.
I type the text and then click the filter button that has the following
code:
If IsNull(Me!txtFilterName) Then
MsgBox "Cannot apply filter, text required!", vbOKOnly, "Filter Info"
Me!txtFilterName.SetFocus
Else
If Me.Dirty Then Me.Dirty = False 'Save first.
Me.Filter = "[CdTitle] Like ""*" & Me.txtFilterName & "*"""
Me.FilterOn = True
Me!lstCd.RowSource= Me.RecordSource
Me!txtFilterName.SetFocus
End If
I'm attempting to synch the form and the list box with this line:
Me!lstCd.RowSource= Me.RecordSource
Buit it isn't working.
Any help will be appreciated.
James