grjhit
10-03-2004, 02:07 PM
HI! I have succeeded where others seem to have problems;
I have created a list box with buttons in a form
They open other forms related to both simple queries or crosstab queries filtering the information as I need them.
The Where statement contains a discrete value i.e. [name]="Jones"
However, on one of the openform statements I have put a variable related to a combo box on my main form in the WHERE statement;
WHERE [name]=[Forms]![Input form]![surname]
This works great for opening a form based on a simple query. BUT when I try a similar statement to open a form based on a crosstab query I have an error;
The microsoft Jet database does not recognize '[Forms]![Input form]![surname]' as a valid field name or expression.
This works perfectly on a form based on a simple query and if I change the variable back to a discrete value for the crosstab related form there is no problem.
ANY IDEAS????
I have created a list box with buttons in a form
They open other forms related to both simple queries or crosstab queries filtering the information as I need them.
The Where statement contains a discrete value i.e. [name]="Jones"
However, on one of the openform statements I have put a variable related to a combo box on my main form in the WHERE statement;
WHERE [name]=[Forms]![Input form]![surname]
This works great for opening a form based on a simple query. BUT when I try a similar statement to open a form based on a crosstab query I have an error;
The microsoft Jet database does not recognize '[Forms]![Input form]![surname]' as a valid field name or expression.
This works perfectly on a form based on a simple query and if I change the variable back to a discrete value for the crosstab related form there is no problem.
ANY IDEAS????