firoz ahmed 0 Newbie Poster

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.

Private Sub Command4_Click()
   Dim mr As Integer
   mr = InputBox("enter a mr no")
   Set rs = New adodb.Recordset
   rs.Open "select * from MR  where req_no = " & CStr(mr), con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
With DataReport2.Sections("section1").Controls
  .Item("text1").DataField = rs.Fields("productname").Name
  .Item("text2").DataField = rs.Fields("qty").Name
  .Item("text3").DataField = rs.Fields("unit").Name
  End With
  Set DataReport2.DataSource = rs
  DataReport2.Orientation = rptOrientLandscape
  DataReport2.Show
End If
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.