Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help getting( where) to work for me

Status
Not open for further replies.

Fastway

Technical User
Nov 30, 2002
16
US
I do realize my code my not be the best or even good but I am new to this so please don't judge to harshly..

Ok what I am need is Last Name 'F%'
What I get is 'Last Name 'F%''

MyData = Data + " like " + " '" + ADV + "%"
adoPrimaryRS.Open "SELECT [First Name],[Last Name],[Address],[Phone #],[License],[Year],[Make&Model],[Engine Info],[Vin #],[Work Done],[Phone#2],[EXT1],[EXT2] from Customers Where " + MyData, db, adOpenStatic, adLockOptimistic

Data works and ADV works but the Where places a ' before the lastname and after the F%' .
Please help how can I stop this!!
I am using vb6...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top