PDA

Click to See Complete Forum and Search --> : Combo box to datagrid


colin
Nov 21st, 2000, 07:29 AM
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

Edneeis
Nov 22nd, 2000, 10:51 PM
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.

colin
Nov 27th, 2000, 10:01 AM
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