Customizing Data Environment??

01-12-2004, 08:35 PM
i using data environment and data report to generate a report. i just drag and drop the field that i want to the data report. but i wan to filter by ID so that only the same column with the same ID number will be show on the data report. i try to build my own SQL inside the data environment but it can't work. i found and example but it also can work. it still show all the data inside the table which mean it won't filter for me by ID number. below is the example:

Load DataEnvironment1
With DataEnvironment1
If .rsCommand1.State <> 0 Then .rsCommand1.Close
.Command1 CStr(cboID)
End With
If rptDetails.Visible = False Then rptDetails.Show vbModal

cboID is my combo box which it a variable that hold the value of my ID number that the user can choose. so how to make the data report that only show the relevant data according to the ID number.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum