Passing parameters to a Data Environment Command Object at runtime
Posted on 2002-03-18
I have a form with a control array of comboboxes and a MSHFlexgrid. The comboboxes are populated from a database table at runtime. I want to display the results of a Data Environment Command, which returns a recordset, in the flexgrid based upon the name the user selects from the combobox. How do I pass the user selection as a parameter to the command object? I can easily get the entire table into the grid with the command text "SELECT * FROM DailyShiftReports" but if I narrow the criteria to "SELECT * FROM DailyShiftReports WHERE EmployeeName = "' & cboEmployeeMaster(0). & "' I get nothing. How can I reload the grid using code in the combobox's click event? Or is my approach faulty?