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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to passing a recordset value as query in crystal?

Status
Not open for further replies.

Vincentan

MIS
Aug 21, 2002
52
MY
I using ADODB and recordset and I facing a problem in crystal selection fomula and any expertise kindly please correct and advice my error!

Dim ItemNoFrom as string, ItemNoTo as string
ItemNoFrom = "ABC001"
ItemNoTo = "ABC100"
crReport.action = 0
crReport.selectionformula = &quot;Select * from tblDB where itemno >= '&quot; & ItemNoFrom & &quot;' and itemno <= '&quot; & ItemNoTo & &quot;'&quot;

It occur error for &quot;... the remaining text is not part of SQL .... &quot;

I try before in

crReport.SQLQuery = &quot;Select * from tblDB where itemno >= '&quot; & ItemNoFrom & &quot;' and itemno <= '&quot; & ItemNoTo & &quot;'&quot;

But it return me wrong data. Any body kindly please help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top