Does anyone know how to pass a Query Parameter to a datacombo datasource or to filter the listfield of a datacombo without making a new query. Or is there a third party control to do this?
Printable View
Does anyone know how to pass a Query Parameter to a datacombo datasource or to filter the listfield of a datacombo without making a new query. Or is there a third party control to do this?
Try this way:
1. Create a Command object with a parameter query in the DataEnvironment.
2. Set the DataCombo's DataSource property to the DataEnvironment object and the DataMember property to the Command object.
3. Every time you want to change the query, use this line of code:
DataEnvironment1.Command1 Parameter1,Parameter2,...
I'm not sure if this is the right way to do that. Maybe you'll have to refresh the DataCombo after this line of code by resetting the DataSource and the DataMember properties.
If you have any problems, tell me.
Actually I know how to use a paramenter outside of a control And I tried the dCombo.refill after passing the parameter but it still doesn't fill the combo with the updated info?????
Maybe you can try to filter the recordset of the Command object (rsCommand1) by using the Filter method and then refill the DataCombo.
Good Luck!!!
No I already tried that but it didn't work. Thanks for your help. Do you know of any controls that are like the Datacombo but have a filter method?