shabbaranks
Registered User.
- Local time
- Today, 03:59
- Joined
- Oct 17, 2011
- Messages
- 300
Hi All,
Ive got a strange issue with my DB. The below code looks up a company ID from the CompanyInfo_tbl and then looks up all records which have that ID and takes the first and last name and populated that within a combo box.
Whats happening is the combo box is being populated with one name but there are infact 2 names in the results -and if I add more the same thing happens it only shows the first result in the combo.
Any ideas please?
Ive got a strange issue with my DB. The below code looks up a company ID from the CompanyInfo_tbl and then looks up all records which have that ID and takes the first and last name and populated that within a combo box.
Code:
Private Sub Contact_Combo_GotFocus()
Dim strCompanyID As Integer
strCompanyID = DLookup("ID", "CompanyInfo_tbl", "[Company]='" & [CompanyNamelookup_txtbx] & "'")
Me.Contact_Combo = DLookup("[Firstname]&"" ""&[Surname]", "CompanyContact_tbl", "[CompanyID]=" & [strCompanyID])
End Sub
Whats happening is the combo box is being populated with one name but there are infact 2 names in the results -and if I add more the same thing happens it only shows the first result in the combo.
Any ideas please?