View Full Version : fill textboxes with a query


cunnie
05-01-2002, 12:16 AM
This has to be possible, I'm sure i'm missing something obvious.

As this is quite complex to describe I've put some screen shots here:
link not available

[This message has been edited by cunnie (edited 05-13-2002).]

Rich
05-01-2002, 10:35 AM
Didn't have time to wait for the form to load, but have you tried a crosstab query?

cunnie
05-02-2002, 12:39 AM
Ok tried a crosstab.

But the criteria refers to three text boxes on the form, like this;
[Forms]![servicesheet]![txtmodel]
[Forms]![servicesheet]![txtvari]
[Forms]![servicesheet]![txtpres]

this works in a select query, but in a crosstab it gives the error;
The Microsoft Jet database engine does not recognise '[Forms]![servicesheet]![txtmodel]' as a valid field name or expression

is there a way to use strings as criteria instead?

[This message has been edited by cunnie (edited 05-02-2002).]

[This message has been edited by cunnie (edited 05-02-2002).]

Rich
05-02-2002, 10:09 AM
You have to define the parameters in a crosstab query.
HTH

cunnie
05-03-2002, 02:47 AM
can you explain what you mean in a bit more detail?

[This message has been edited by cunnie (edited 05-03-2002).]

cunnie
05-07-2002, 07:44 AM
parameters?...parameters? where are these parameters?

i'm using access 97 btw

Rich
05-07-2002, 09:23 AM
Click query on the toolbar when in design mode, select Parameters from the drop down,
should be something like
Forms!servicesheet!txtmodel/ data type text
or whatever.

cunnie
05-08-2002, 12:30 AM
Ah, I see...

Now I get a box prompting me to input a value when I run the query, access really doesn't like crosstab queries and textboxes does it.

Rich
05-08-2002, 12:43 AM
Yes it does you just have to get to grips with them, if the query's asking for a parameter you've either defined them incorrectly or the form with the relevant text boxes is not open.
HTH

cunnie
05-10-2002, 07:12 AM
OK, i set the parameters correctly and refer to everthing with the right name, but i'm getting an error again. A nice vague one;

"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables"