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

Re: Retrieving query records on datareport

 
0
  #10
Jan 3rd, 2009
[QUOTE=ryan311;769960]Private Sub Command4_Click()
system hangs i don't know why
Private Sub Command4_Click()
Set rs = New adodb.Recordset
rs.Open " select * from MR query", con, adOpenDynamic, adLockOptimistic
If rs.RecordCount > 0 Then
If Not rs.EOF Then
With DataReport2.Sections("section1").Controls
.Item("text1").DataField = rs.Fields("dept_name").Name
End With
Set DataReport2.DataSource = rs
DataReport2.Orientation = rptOrientLandscape
DataReport2.Show
End If
End If
End Sub
Reply With Quote