Guest_imported
New member
- Jan 1, 1970
- 0
Hi
I'm using the query builder in VB 6 and I'm a little stuck. I have selected the fields from two different tables that I require and placed the sort order, etc.
What I want to do is to only list values where an id field matches that of a variable on my form. In the criteria bit next to my field in the builder, I want to say something like "= MyVar" where MyVar is a variable declared on my form. I get the error "MyVar is not a part of the query".
Is there a way to list this? In Access you could set the criteria of a query to an object on your form such as a combo box so it only lists records that match that value.
Thanks for any help
Nora
I'm using the query builder in VB 6 and I'm a little stuck. I have selected the fields from two different tables that I require and placed the sort order, etc.
What I want to do is to only list values where an id field matches that of a variable on my form. In the criteria bit next to my field in the builder, I want to say something like "= MyVar" where MyVar is a variable declared on my form. I get the error "MyVar is not a part of the query".
Is there a way to list this? In Access you could set the criteria of a query to an object on your form such as a combo box so it only lists records that match that value.
Thanks for any help
Nora