Thanks a lot for reply, JGGTZ...
am using OCX for CR Engine.
my code is as below...
Code:
Private Sub CmdPRINT_Click()
Dim strQID As Long
strQID = Trim(Text20.Text - 1)
Set rs = db.OpenRecordset("Select * from Quotation Where QID = " & strQID & " ")
Set rs1 = db.OpenRecordset("Select * from Quotation1 Where QID = " & strQID & " ")
CRpt1.ParameterFields(0) = "QID;" & Trim(Text20.Text - 1) & ";True"
CRpt1.Action = 1
End Sub
and i try it by other way...I save all data to ONE Table instead of 2 tables. its code is as below...
Code:
Private Sub cmdPRN_Click()
Dim strQID As Long
strQID = Trim(Text20.Text - 1)
Set rs1 = db.OpenRecordset("Select * from SavePrintNew Where QID = " & StrQID & " ")
CRpt1.Reset
CRpt1.ReportFileName = App.Path & "\Reports\rpt.rpt"
CRpt1.ParameterFields(0) = "QID;" & Trim(Text20.Text - 1) & ";True"
CRpt1.Action = 1
End Sub
but in this code i got " RUNTIME ERROR 20553 - Invalid Parameter Field Name" and when i Debug it, it Highlight LAST LINE of CODE which is "CRpt1.Action = 1" and
when i move my cursor on that it show this message "CRpt1.Action = <Property is Write-Only>" !!!
what suld i do in both case...plz help ASAP
thanks again...
kaushal