I am receiving the below error when creating a form where my users can search for their clients. I keep getting the below error. I have run the query in design view and it runs without any error. Any help is appreciated!
SELECT Client_Data_qry.ID, Client_Data_qry.Client_Name, Client_Data_qry.Business_Type, Client_Data_qry.Contact_Person, Client_Data_qry.Contact_Nbr, Client_Data_qry.Contact_Email_Add, Client_Data_qry.Client_Name AS Client_Data_qry.Business_Type AS [Business Type] FROM Client_Data_qry WHERE (((Client_Data_qry.Client_Name) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Business_Type) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Contact_Person) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Contact_Nbr) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Contact_Email_Add) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) ORDER BY Client_Data_qry.ID DESC;
SELECT Client_Data_qry.ID, Client_Data_qry.Client_Name, Client_Data_qry.Business_Type, Client_Data_qry.Contact_Person, Client_Data_qry.Contact_Nbr, Client_Data_qry.Contact_Email_Add, Client_Data_qry.Client_Name AS Client_Data_qry.Business_Type AS [Business Type] FROM Client_Data_qry WHERE (((Client_Data_qry.Client_Name) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Business_Type) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Contact_Person) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Contact_Nbr) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) Or (((Client_Data_qry.Contact_Email_Add) Like "*" & Forms!frmAdvancedSearch_Client_Data!txtSearch2 & "*")) ORDER BY Client_Data_qry.ID DESC;