View Single Post
Join Date: Dec 2008
Posts: 287
Reputation: firoz.raj is an unknown quantity at this point 
Solved Threads: 1
firoz.raj firoz.raj is offline Offline
Posting Whiz in Training

Re: Retrieving query records on datareport

 
0
  #8
Jan 3rd, 2009
where should i write
i have written in print_click but it is not working
Private Sub Command4_Click()
Set rs = New adodb.Recordset
rs.Open " select * from MR query", con, adOpenDynamic, adLockOptimistic
Set DataReport2.DataSource = rs
DataReport2.Orientation = rptOrientLandscape
'With DataReport2.Sections("Section1").Controls
'.Item("Text1").DataField = rs.Fields("Emp_file").Name
'End With
DataReport2.Sections("section1").Controls
Set DataReport2.DataSource = rs
DataReport2.Show
End Sub
Reply With Quote