>mFrom = txtFrom.text
>mTo=txtTo.text
>
>mSQL="Select * from Cust where CCode between " &mFrom& " and " & mTo
What type are your parameters (numeric, date or text)?
If they are text, your SQL query should look like:
Select * from Cust where CCode between '" & mFrom & "' and '" & mTo & "'"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com