View Full Version : Query Expression where one field is greater than another


1starr
05-08-2002, 09:10 AM
I have two fields in my query , lets call one Access_amt and the other Total_amt, where I only want the query to print out the record of those who's Total_amt is greater than the Access_amt. I have tried a lot of combinations such as creating a subquery with in the query, but nothing seems to work. Do anyone have any I ideas.
Thanks...

littlelegs
05-08-2002, 09:32 AM
are they in the same table? If so then you should be able to use/build an expression in the criteria on the total_amt field, something like:

>= access_amt

(looks easy but then again... maybe i'm missing something... http://www.access-programmers.co.uk/ubb/smile.gif) )

1starr
05-13-2002, 04:40 AM
I didn't know what I was thinking of. I was trying to perform this task in a query that had two other tables in it. So what I did was take the table with the two fields I need and create the greater than query, then I added that query into another query with the other two tables. That provide the data I was attempting to get. Thanks for your help.