-
Mar 5th, 2007, 08:27 PM
#1
Thread Starter
New Member
Runtime Error '20534' : Error detected by database dll
I have facing problem with vb6 and crystal report 8 . The error message is "Runtime error '20534' : Error detected by database dll". If i remove the red color line. It don't have any error.
Private Sub VIButton15_Onclick()
If docheck = True Then
Call clearReport
If optSearch(0).Value = True Then
Report.SelectionFormula = "{Sales.Receiptno} >='" & txtfrom & "' and {Sales.Receiptno} <='" & txtTo & "'" & temp
End If
If optSearch(1).Value = True Then
Report.SelectionFormula = "{Sales.Salesdate} >=" & changerptdate(txtfrom) & " and {Sales.Salesdate} <=" & changerptdate(txtTo) & temp
End If
Report.ReportFileName = Reportpath & "\CustomSales\10Topsalesbyitems.rpt"
Report.Formulas(0) = "company ='" & Branchid.Text & "'"
Report.Formulas(1) = "DateRange ='Sales Date from " & txtfrom & " to " & txtTo & "'"
Report.Action = 1
End If
End Sub
-
Mar 6th, 2007, 01:41 AM
#2
Re: Runtime Error '20534' : Error detected by database dll
Probably
This error will occur due to wrong formula or the selection formula so check them first in debug mode.
As I got error in the red line you are using the date with the wrong selection formula.
So just read how to use the date in the selection formula. I suggest you that just read the crystal report tutorial at my signature, where I provide example for using date in the selection formula.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|