Results 1 to 5 of 5

Thread: Parameters in DataCombo Data Source

  1. #1

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Resolved

    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?
    Last edited by Edneeis; Sep 20th, 2004 at 10:03 PM.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    253

    Lightbulb

    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.


  3. #3

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Didn't work

    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?????

  4. #4
    Addicted Member
    Join Date
    Oct 1999
    Posts
    253

    Lightbulb

    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!!!

  5. #5

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    Unhappy Thanks but...

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width