Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to use Combox box value to filter ADO recordsets

OlukoyaOlukoya Member Posts: 1
I created ADO control and created a data grid whose record source was the ADO control. I created a data combo of records from another table so that I can filter the data grid records using the current data combo record. I have created one-to-many relationship between the data combo base table and the data grid base table. I did not suceed. How do I get it done?

Comments

  • jlegjleg Member Posts: 237
    : I created ADO control and created a data grid whose record source was the ADO control. I created a data combo of records from another table so that I can filter the data grid records using the current data combo record. I have created one-to-many relationship between the data combo base table and the data grid base table. I did not suceed. How do I get it done?
    :
    Filter your ADO recordset by using the value from the Combo. Use the combo's click event.

    MyADO.Recordset.Filter = "MyField = '" & MyCombo.text & "'"

    Not sure if you have to rebind the datagrid after applying the filter.

    Hope this helps

    John ;-)
  • GideonOmegaGideonOmega Member Posts: 617
    : : I created ADO control and created a data grid whose record source was the ADO control. I created a data combo of records from another table so that I can filter the data grid records using the current data combo record. I have created one-to-many relationship between the data combo base table and the data grid base table. I did not suceed. How do I get it done?
    : :
    : Filter your ADO recordset by using the value from the Combo. Use the combo's click event.
    :
    : MyADO.Recordset.Filter = "MyField = '" & MyCombo.text & "'"
    :
    : Not sure if you have to rebind the datagrid after applying the filter.
    :
    : Hope this helps
    :
    : John ;-)
    :


    and don't forget to refresh your contols , IE datagrid and ado after any data changes or you may not display the changes.
    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

Sign In or Register to comment.