Access 2010 Filter not working ...

Microsoft Windows xp professional w/serv...
February 17, 2011 at 11:40:29
Specs: Windows XP Pro
Navigation = main form
2nd tab = Contacts
2nd level navigation = Search
navigation tab form = Contact List
subform on Contact List to display record on filter = subSearchContacts
list box on Contact List = listsearchbox

:) Make a double click selection from listsearchbox and .....

If Me.listsearchbox.ItemsSelected.Count > 0 Then

Me.Filter = "[ContactID]='" & Me.listsearchbox & "'"
Me.FilterOn = True


MsgBox "Please try your search again."

Me.lasttxt.Text = ""

Me.firsttxt.Text = ""
End If

However, I am not getting a filter. Is this a type issue? It should filter on the ContactID, which is display in '###' when I insert a break and view the processes. It is there, but I am not filtering. Do I need a refresh? I am getting a "blink" as if I am trying to go somewhere.

:-/ I hate learning new things. So, what do you think?

I'm learning.

See More: Access 2010 Filter not working ...

Report •

February 17, 2011 at 18:17:31
I will answer my own question again. :)

I decided to add a combo box. I wrote this in the after update action ...

Private Sub combosearchbox_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![combosearchbox], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

The kick to this was being able to type any letter of the first name with any letter of the last name and to fill the combo box on a query, which is where a user would select the contact and the form would fill. <sigh>

Note: I forgot to mention that I abandoned the subSearchContacts form and used the form header for my search, because I removed the list box and had space. One form seemed less crowded and easier to work with too.

Attempting to simulate what they already know proved to be quite a task!

I'm still learning everyday.

Report •
Related Solutions

Ask Question