hai,
i am using access database. Iam selecting few records based on a condition. For e:g select * from stud where avg>90 and placing these records in a multiselect list box. for e:g if there 10 records and i want to print any two selected records from the list box in the data report. How is it possible? Please help.
thanks
indra.
1) Create a temperory table fields are which you want to Place on data report
2) cnn.Execute "Delete * from temporary Table Name"
For i = 1 To lstvRegistration.ListItems.count
If lstvRegistration.ListItems(i).Selected = True Then
j = j + 1
If rs.State = 1 Then
rs.Close
End If
rs.Open "select * from Registration where ID=" &
lstvRegistration.ListItems(i).Text & "", cnn, adOpenStatic
If rs.EOF <> True And rs.BOF <> True Then
If rs.Fields(0) <> "" Then
cnn.Execute "Insert into temp.Tbl Name Values (Fields which you
want to place in Data report )"
End If
End If
End If
Next i
After that you Simply Load report and show it.