Results 1 to 3 of 3

Thread: Combo box to datagrid

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204

    Question

    Hi All,

    Could anyone tell me how to pass a value selected from a combo box to an SQL statement to populate my datagrid. I always seem to get error '91': "Object variable or with block variable not set"

    Thanks

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Bind the grid to a datasource then just run the SQL statement on the datasource itself and the changes will be reflected in the Grid. Use the combo click event to set the SQL. Are you using a datacombo? Regular Combo? Is the text of the combo a field from the data the grid is bound to? Post some code and we'll hook you up.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204

    Thanks

    Thanks,
    the info you gave was enough to sort the problem for me. Sorry for the delay, i had a major meltdown and just got things up and running again.

    Originally posted by colin
    Hi All,

    Could anyone tell me how to pass a value selected from a combo box to an SQL statement to populate my datagrid. I always seem to get error '91': "Object variable or with block variable not set"

    Thanks

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