hI, pLEASE HELP!.
I am working in data environment creating a report through datareport. I have the following code behind a print button. it is giving me an error message of invalid use of property stopping at:
.rsGrandTotal1 strParam1
How do you get the report to show only records with the date matching the inputbox?
I have try using the parameter in the parameter tab when I put a ? in the sql. it runs ok if I put a value in the value field. if I put the correct value it shows the records I specify. if I put a bogus value it shows nothing, which is what I want but then this doesn't give the user the opportunity to enter the date they want.
that is why I try the follwing but it doesn't seem to work. Please help anyone out there. I try looking at other thread but it doesnt seem to any my problem.
thanks
kay
Private Sub Command1_Click()
t = InputBox("Enter Date"
Dim strParam1 As String
strParam1 = "saldate by day=" & t
With DataEnvironment1
If .rsGrandTotal1.State <> 0 Then .rsGrandTotal1.Close
DoEvents
.rsGrandTotal1.Open
.rsGrandTotal1 strParam1
End With
Salestotalreport.Refresh
If Salestotalreport.Visible = False Then Salestotalreport.Show
End Sub
I am working in data environment creating a report through datareport. I have the following code behind a print button. it is giving me an error message of invalid use of property stopping at:
.rsGrandTotal1 strParam1
How do you get the report to show only records with the date matching the inputbox?
I have try using the parameter in the parameter tab when I put a ? in the sql. it runs ok if I put a value in the value field. if I put the correct value it shows the records I specify. if I put a bogus value it shows nothing, which is what I want but then this doesn't give the user the opportunity to enter the date they want.
that is why I try the follwing but it doesn't seem to work. Please help anyone out there. I try looking at other thread but it doesnt seem to any my problem.
thanks
kay
Private Sub Command1_Click()
t = InputBox("Enter Date"
Dim strParam1 As String
strParam1 = "saldate by day=" & t
With DataEnvironment1
If .rsGrandTotal1.State <> 0 Then .rsGrandTotal1.Close
DoEvents
.rsGrandTotal1.Open
.rsGrandTotal1 strParam1
End With
Salestotalreport.Refresh
If Salestotalreport.Visible = False Then Salestotalreport.Show
End Sub