<br><font size=2 face="Arial">Try this:</font>
<br>
<br><font size=2 face="Arial">strSQL = "SELECT tblCustomers.CustomerID, "<br>
strSQL = strSQL & "[tblCustomers]![CustomerNumber] & '-' & [tblCustomers]![CustomerSite] " <br>
strSQL = strSQL & "AS CustCode, tblCustomers.CustomerName, tblCustomers.Address1 & ' ' & "<br>
strSQL = strSQL & "tblCustomers.Address2 & ' ' & tblCustomers.Address3 & ' ' & "<br>
strSQL = strSQL & "tblCustomers.Postcode AS Address, tblCustomers.DepotID FROM tblCustomers "<br>
strSQL = strSQL & "WHERE (((tblCustomers.CustomerName) Like % + "<br>
strSQL = strSQL & strInput & " + %)) "<br>
strSQL = strSQL & "ORDER BY tblCustomers.CustomerName;"</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>ACTEBS <actebs@actebs.com.au></b></font>
<br><font size=1 face="sans-serif">Sent by: accessd-bounces@databaseadvisors.com</font>
<p><font size=1 face="sans-serif">06/05/2003 09:55 AM</font>
<br><font size=1 face="sans-serif">Please respond to accessd</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: "access group" <accessd@databaseadvisors.com></font>
<br><font size=1 face="sans-serif"> cc: </font>
<br><font size=1 face="sans-serif"> Subject: [AccessD] Like Operator SQL Syntax</font></table>
<br>
<br>
<br><font size=2 face="Arial">Hi People,</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="Arial">Can anyone tell me what wrong with the following syntax:</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="Arial">strSQL = "SELECT tblCustomers.CustomerID, " _<br>
& "[tblCustomers]![CustomerNumber] & '-' & [tblCustomers]![CustomerSite] " _<br>
& "AS CustCode, tblCustomers.CustomerName, tblCustomers.Address1 & ' ' & " _<br>
& "tblCustomers.Address2 & ' ' & tblCustomers.Address3 & ' ' & " _<br>
& "tblCustomers.Postcode AS Address, tblCustomers.DepotID FROM tblCustomers " _<br>
& "WHERE (((tblCustomers.CustomerName) Like % + " _<br>
& strInput & " + %)) " _<br>
& "ORDER BY tblCustomers.CustomerName;"</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="Arial">I am creating an ADO recordset and obviously ADO use % as the wild card and not * so I am not sure where the issue currently is...</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 face="Arial">Thanks</font>
<br><font size=2 face="Arial">Vlad</font>
<br><font size=3 face="Times New Roman"> </font><font size=2 face="Courier New">_______________________________________________<br>
AccessD mailing list<br>
AccessD@databaseadvisors.com<br>
http://databaseadvisors.com/mailman/listinfo/accessd<br>
Website: http://www.databaseadvisors.com<br>
</font>
<br>
<br>