I have a form (continuous) with a few fields :
First Name, Last Name, Policy Number, etc.
In the form footer I have a combo box for LastName which has 3 TEXT
fields: LastName, FirstName & Policy Number
When the user clicks a LastName on the Combo it should seek & position
me on that record on the continuous form. That's ok till here.
The problem is: It always position me on the 1st ocurence of the
LastName. Here's an example ...
L.Name F.Name Policy-Num
Astle Abbey 45
Bodey Art 56
Coelho Benny 87
Coelho Sebastian 33
Coelho Sebastian 34
Coelho Sebastian 35
Coelho Sebastian 36
Coelho Sebastian 37
Now, if I click on the 7th row Policy Number 36 (Coelho Sebastian), I
get positioned at Policy Number 87 (Coelho Benny).
Here's the SQL code for my combo box row source:
SELECT PMF.I_NAME_L, PMF.I_NAME_F, PMF.POLNO FROM PMF ORDER BY
PMF.I_NAME_L, PMF.I_NAME_F, PMF.POLNO;
Here's my combo-box Find Routine Code:
Private Sub Cmb_LName_Click()
Me.OrderBy = "I_NAME_L, I_NAME_F"
Me.OrderByOn = True ' Putting it for safety JUST TO BE SURE
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[I_NAME_L] = '" & Me.Cmb_LName.Column(0) & "' and "
& _
"[I_NAME_F]= '" & Me.Cmb_LName.Column(1) & "' and "
& _
"[POLNO]= '" & Me.Cmb_LName.Column(2) & "'"
Me.Bookmark = rs.Bookmark
Me.I_NAME_L.BackColor = 16777088
End Sub
Can someone please point out what I'm doing wrong ? I'm sure it's
something very minor that I'm overlooking.
Thx & Best Rgds,
Prakash.