Combo Box doesn't work after conversion from 2003 to 2007

N

Nika

I have created a last anme combo box in Access Form 2003, using the wizard.
For some reasons I couldn't search last names with apostrope. Well, I have
received a tip on the forum and I have entered the code (please see below).
However, I have recently converted Access 2003 to 2007 and my search box
doesn't work at all.
Does any one know why?
I will greatly appreciate your answers.
Thank you.

Private Sub Combo384_AfterUpdate()
Dim rs As DAO.Recordset
Dim strWhere As String

If Me.Dirty Then Me.Dirty = False
Set rs = Me.RecordsetClone
strWhere = "[LAST NAME] = """ & Me![Combo384] & """"
rs.FindFirst strWhere
If rs.NoMatch Then
MsgBox "Not found"
Else
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top