B
Bob Quintal
=?Utf-8?B?VGhlVmVoaWNsZUZpbmRlcg==?=
will find the first Keith each time you run it If you want to find
the second Keith you will need to change the findfirst to findNext.
Or you could do a findfirst on the firstname & lastname
rs.FindFirst "[FirstName] = '" & Me![Combo184] & "' AND " _
"[lastname] = """ & me![combo184].column(2) & """"
Well, if you look at the code, it should be evident that findFirstHi,
I've created a combo box in a contact form to search for contacts
by first name. When it finds the name i want, all i do is select
by clicking from the dropdown menu, and it loads all fields from
the contact table into the form for that particular contact ready
for editing. It has an autopredict facility and works fine when
there is only one entry for a particular first name. I'm having
problems when is more than one record with a particular first
name, for example i have 3 keiths in the contact table and it will
only load the same one up despite me clicking on the others. There
is only one "Leo" for example and it has no problem loading up his
data. The code is as follows:
Private Sub Combo184_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[FirstName] = '" & Me![Combo184] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Any help will be much appreciated.
Thanks,
Paul
will find the first Keith each time you run it If you want to find
the second Keith you will need to change the findfirst to findNext.
Or you could do a findfirst on the firstname & lastname
rs.FindFirst "[FirstName] = '" & Me![Combo184] & "' AND " _
"[lastname] = """ & me![combo184].column(2) & """"