showing record on the report

Reply

Join Date: Dec 2008
Posts: 5
Reputation: firoz ahmed is an unknown quantity at this point 
Solved Threads: 0
firoz ahmed firoz ahmed is offline Offline
Newbie Poster

showing record on the report

 
0
  #1
Jan 5th, 2009
i want fields department,job_centre,cost centre should come
first before detail section can anybody tell me how should
i code for that. i have written a code it is working fine but
i am making iso certified report and req. is to place fields just
above the detail section kindly let me know urgent.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command4_Click()
  2. Dim mr As Integer
  3. mr = InputBox("enter a mr no")
  4. Set rs = New adodb.Recordset
  5. rs.Open "select * from MR where req_no = " & CStr(mr), con, adOpenDynamic, adLockOptimistic
  6. If Not rs.EOF Then
  7. With DataReport2.Sections("section1").Controls
  8. .Item("text1").DataField = rs.Fields("productname").Name
  9. .Item("text2").DataField = rs.Fields("qty").Name
  10. .Item("text3").DataField = rs.Fields("unit").Name
  11. End With
  12. Set DataReport2.DataSource = rs
  13. DataReport2.Orientation = rptOrientLandscape
  14. DataReport2.Show
  15. End If
  16. End Sub
Last edited by Ancient Dragon; Jan 5th, 2009 at 3:22 pm. Reason: add code tags
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 322 | Replies: 0
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC