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???
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));
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???
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));