|
-
Dec 5th, 2000, 09:08 PM
#1
Thread Starter
New Member
I have VB 5.0 and Crystal 4.6xxx. I am trying to select records in my database to pass on to crystal reports. I am inputting a start date and an end date. and trying to get it to print the report. I keep getting an "error in formula".
Can anyone please HELP.
I have include my code below.
Dim stdte As Date
Dim endte As Date
Private Sub Command1_Click()
stdte = startdate.Text
endte = enddate.Text
Number_of_copies = "1"
Outputlist = "Printer"
OutputDestination = 2
Report4.CopiesToPrinter = Number_of_copies
Report4.Destination = OutputDestination
FmlaText$ = "{data.dte} in + Trim(startdate.text) + to + Trim(enddate.text) + "
Report4.SelectionFormula = FmlaText$
On Error GoTo ErrorHandler
Report4.Action = 1
Unload frmgrspft
frmDocument.Show
Exit Sub
ErrorHandler:
MsgBox error$
Exit Sub
End Sub
Private Sub Form_Load()
startdate.Text = "11/1/2000"
enddate.Text = "12/1/2000"
End Sub
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
|