I'm creating a front end to a MS Access DB linked to a Ctree++ Db using VB. I want to create a report based on some selections the user checks on a form. For example the user selects the various types of services to be reported for and the report is supposed to show all the vendors who offer such service, grouped by service. All the data is comming from the Access Db. I used Report designer to create a command and then used that as the datasource of the report. When the user makes a selection I create a Where clause that is inserted into the CommandText value for the command. The report works fine for the selections filtering but only works the first time. I close the report and then open and enter different options but only the options selected the first time are used. Only if I close the entire app down the restart does it allow me modify the SQL behind the Command. I tried the parameter option for the command but the thing is I do not know how many parameters will be specified by the user (between zero and thirty max). Do I have to close some connection or is it persistent somehow? I read in a previous post about using an ADO recordset to be the source of the report but I am getting problems with that in specifying the relation between controls on the form and field in the recordset. Can anyone tell me how to do this (creating a report based on runtime where-clause options)? Maybe there is a simpler method that I am not seeing. I am fairly new at this.
Navin Parray
Navin Parray