|
-
Apr 21st, 2007, 09:19 AM
#1
Thread Starter
Addicted Member
Passing Value to Data Report
Hai Friends and Gurus,
Please tell how to pass the value to data report during run time.
Code:
Private Sub Command2_Click()
Dim ssq As String
Set cn1 = New ADODB.Connection
Set rse = New ADODB.Recordset
cn1.Provider = "Microsoft.Jet.OLEDB.3.51;"
cn1.ConnectionString = "Persist Security Info=false;" _
& "Data Source=D:\postcost\inve.mdb"
cn1.Open
ssq = "Select * From inve where edate = # " & Text1.Text & " # "
rse.Open ssq, cn1, adOpenDynamic, adLockOptimistic
Set DataReport1.DataSource = rse
DataReport1.Show
End Sub
While printing the Data Report - In the title the Text1.text's date value to be displayed.
Thanks in advance.
Saravanan.
-
Apr 21st, 2007, 10:44 AM
#2
Re: Passing Value to Data Report
DataReport1.Title = Text1.Text
If you are wanting to set the value of an unbound control use something like
Datareport1.Sections("Section2").Controls("Label1").Caption = "Hello World"
-
Apr 23rd, 2007, 07:26 AM
#3
Re: Passing Value to Data Report
-
Apr 24th, 2007, 02:23 AM
#4
Thread Starter
Addicted Member
Re: Passing Value to Data Report
Thanks friends,
I am not getting clear result for this...please advice
I enter the following code :
vb Code:
DataReport1.Sections("Section4").Controls("Label3").Caption = #" & Text1.Text & "#
Still Error on # Symbol. if removed the # in both side & Text1.Text -only in display
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
|