Here is an outline of the code :<br><br>Dim strCond, strSQL as String<br><br><br>strSQL= "select * from tablea where fieldname like '%"<br><br>strCond = "abc" <br>'Where abc is the part string you are looking for<br><br>strSQL = strSQL & strCond & "%'"<br><br>Set adoRS = adoComm.execute strSQL
<br><br>O.K. In SQL Server you use the character '%' for wild card searches; as in : <br>"Select * from [thetable] where name like 'Ami%'"<br>If I'm in there it'll find me.<br><br>In MS Access you use the character "*" for wild card searches. Therefore with the statement:<br>"Select * from [thetable] where name like 'Ami*'"<br>If I'm in there it'll find me.<br><br>Or even (In Access)...<br>"Select * from [thetable] where name like '*el'"<br>If I'm in there it'll find me.<br><br>Have Fun !<br><br><br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.