Click to See Complete Forum and Search --> : Parameters in DataCombo Data Source
Edneeis
May 2nd, 2000, 02:26 PM
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?
Forest Dragon
May 4th, 2000, 07:14 PM
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.
Edneeis
May 5th, 2000, 09:53 AM
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?????
Forest Dragon
May 5th, 2000, 06:20 PM
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!!!
Edneeis
May 6th, 2000, 07:12 AM
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?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.