firoz ahmed 0 Newbie Poster

sir
i want if user click on product id all the detail should come on the data report it should come itemwise all the required field is com.
but problem is that all the records is comming more that one time
kindly help me i have written a code in command1_click it is working fine but need is that when user put item code in form those records which is similar it should come group wise here is the
When report is comming department , cost centre, Cost Centre manager(fields) ,requested by ..
are comming two times why according to Iso certified report it should come one time here is the code.

code

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
  .Item("text4").DataField = rs.Fields("dept_name").Name
  .Item("text5").DataField = rs.Fields("job_no").Name
  .Item("text6").DataField = rs.Fields("cost_centre").Name
  .Item("Text7").DataField = rs.Fields("Emp_name").Name
  .Item("text8").DataField = rs.Fields("mr_date").Name
  .Item("text9").DataField = rs.Fields("del_point").Name
  .Item("TEXT10").DataField = rs.Fields("MANAGER").Name
  .Item("TEXT11").DataField = rs.Fields("REQ_NO").Name
   End With
  Set DataReport2.DataSource = rs
  DataReport2.Orientation = rptOrientLandscape
  DataReport2.Refresh
  DataReport2.Show vbModeless
End If
End Sub[ATTACH]8800