Really fundamental QUERY question!

L

Lord Luv A Duck

I'm sure I'm being a dolylum here and missing something obvious, so
feel free to call me any names, but ONLY after you've answered my
question successfully!

If have 3 columns in my query:-

Value A
Value B
Value (B minus A)

but I only want a line to show when (B minus A) =2

So I have:-

Column A (with no criteria)
Column B (with no criteria)
In Column C I have "Expr1: - [A]" but when I put "=2" in criteria,
it doesn't like it. Well, it passes the syntax ok, but when I run it,
it comes up with a box wanting a parameter to be entered!

A workmate thought it might be because "Expr1" is just a temporary
working field, so you can't do tests on it, but I find that hard to
believe..... SURELY it must be quite often that people need to check
the value of a working field ????? I can't believe that Microsoft
would not allow for that!

Thanks!
 
B

Bob Barrows

Lord said:
I'm sure I'm being a dolylum here and missing something obvious, so
feel free to call me any names, but ONLY after you've answered my
question successfully!

If have 3 columns in my query:-

Value A
Value B
Value (B minus A)

but I only want a line to show when (B minus A) =2

So I have:-

Column A (with no criteria)
Column B (with no criteria)
In Column C I have "Expr1: - [A]" but when I put "=2" in criteria,
it doesn't like it. Well, it passes the syntax ok, but when I run it,
it comes up with a box wanting a parameter to be entered!


You really need to be explicit when asking for help: we are not looking over
your shoulder at your screen. Tell us the exact textdisplayed in the popup
window asking for a parameter value.

Does the query run when you don't put a value in the criteria row?
A workmate thought it might be because "Expr1" is just a temporary
working field, so you can't do tests on it,

No, that's not right
but I find that hard to
believe..... SURELY it must be quite often that people need to check
the value of a working field ????? I can't believe that Microsoft
would not allow for that!
Show us the sql statement (switch your query to SQL View either using the
View menu, or the toolbar button, or the right-click menu) and copy the text
from the window. Based on the above, if everything is as described, the sql
statement should be:
SELECT [A],, -[A] As Expr1 FROM tablename
WHERE -[A] = 2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top