M
maura
I have a combo box that is doing a search by renterlastname. Problem is that
there could be multiple times a renter's last name appears. The combo box is
based on
qryRentalAgreement and I have it references the RentalAgreementID. And it
works, EXCEPT... the name won't appear in the combo box once you have
selected it. So you type in Fitzgerald, and it will pull up the record, but
the name won't show. I can go back and type in Fitzgerald and select the 2nd
record down and it shows the other record, but again the name doesn't stay in
the box. Any ideas. I have another database (repossessions, and sometimes we
repossess a person multiple times) and I copied the code from that database,
it works fine for the repo db, but not for this one... Any thoughts?
Private Sub Form_Current()
cboRentalAgreement.Value = RentalAgreementId
cboRenterLast.Value = RenterLastName
End Sub
Private Sub cboRenterLast_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[RentalAgreementId] = " & Me![cboRenterLast].Value & ""
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'cboRenterLast.Text = Me![RenterLastName]
End Sub
there could be multiple times a renter's last name appears. The combo box is
based on
qryRentalAgreement and I have it references the RentalAgreementID. And it
works, EXCEPT... the name won't appear in the combo box once you have
selected it. So you type in Fitzgerald, and it will pull up the record, but
the name won't show. I can go back and type in Fitzgerald and select the 2nd
record down and it shows the other record, but again the name doesn't stay in
the box. Any ideas. I have another database (repossessions, and sometimes we
repossess a person multiple times) and I copied the code from that database,
it works fine for the repo db, but not for this one... Any thoughts?
Private Sub Form_Current()
cboRentalAgreement.Value = RentalAgreementId
cboRenterLast.Value = RenterLastName
End Sub
Private Sub cboRenterLast_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[RentalAgreementId] = " & Me![cboRenterLast].Value & ""
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'cboRenterLast.Text = Me![RenterLastName]
End Sub