Filter Combo Box Results (1 Viewer)

access7

Registered User.
Local time
Today, 09:08
Joined
Mar 15, 2011
Messages
172
Good Morning

Another query I am struggling with... I have a combo box that shows a companies Contacts. I have merged the forename and surname fields together (due to other aspects of the database)

My manager has reviewed the database on Friday and has stated that he wants the Contact Combo box to be 'filtered' on both forename and surname - in other words, he wants the list to be limited depending on what the user types - this does happen currently but only seems to go off the first letter rather than any letter of the name...

Could someone tell me whether this is because I have merged the fields or because I am not telling the query to look at all letters??? :confused:

I have copied the SQL data from the query below

SELECT Qry_Company.CompanyRef, [Forename] & " " & [Surname] AS Contact, Tbl_ContactDetails.ContactRef, Tbl_ContactDetails.MainContact
FROM Qry_Company INNER JOIN Tbl_ContactDetails ON Qry_Company.CompanyRef = Tbl_ContactDetails.CompanyRef
WHERE (((Qry_Company.CompanyRef)=[Forms]![Frm_Company]![txtCompanyID]) AND (([Forename] & " " & [Surname]) Like "*" & [Forms]![Frm_Company]![SubFrm_Correspondence]![cboContact].[Text] & "*") AND ((Tbl_ContactDetails.Archived)=False));
 

Users who are viewing this thread

Top Bottom