Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unusual problem with report

Status
Not open for further replies.

RBE

Programmer
May 25, 2000
72
US
This is really strange and I am going to try to explain it the best I can. If you need more information let me know.
I have a field on a report that has this if statement in it
The name of this field is [rec gal]
=IIf([GALLONS]>=[sum gallons received],[Gallons Received],0)

Here is the problem. The gallons field is set at a certen value (i.e. 25000) the sum gallons received is a running total calculated by the report, and the gallons received is pulled in by a query off of a table (no calculations)

here is an example of what I am getting back
Gallons sum gallons gallons received rec gal
25000 2000 2000 2000
25000 10000 8000 8000
25000 20000 10000 10000
25000 22000 2000 0
25000 24000 2000 0
25000 25000 1000 1000
25000 50000 25000 0
25000 60000 10000 0
25000 70000 10000 10000

As you can see there is no real pattern to what shows and what does not I did notice that once the sum gallons went over the Gallons field and it started filling in the rec gal field it did not stop untill the end of the report. At first I thought it was formating but where would a formating error cause this kind of results. and if I reverse the > symbol to < all the ones that are not showing that should will show and vise-versa. A strange one any Inupt would probably help in this one. Thanks
RBE

 
Can anyone at least give me something to look for. Thanks
 
The gallons field is a numeric filed. I don't know how it worked but I moved the gallons field into the query and it works just fine thank you for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top