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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QUERY QUESTION

Status
Not open for further replies.

HerickP

IS-IT--Management
May 10, 2000
68
US
hI AGAIN,<br>I am having a problem finding a result using the query; I have a Table with many fields, in question are SHIPPED ON, DELIVERED ON, STATUS. On the Status field, everytime something gets delivered, I change the status from INTRANSIT to DELIVERED. Running the query, I can find a total of records for the whole field (885) and total of Delivered ( 4); NOW, how to find the difference between both ( which is 881), so I can have it in a report?? Please help
 
couldn't you just do (say in your same query):<br>put for a field in your query:<br><b>Difference: [Total]-[Total of Delivered]</b><br><br>but Total has to be the name of the field giving the total, and likewise for Total of Delivered. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
well, what i was getting at, was that if you have the total number (885) and you have the total delivered (4)<br>couldn't you just put a text box on your report that took the total number and subtracted the total delivered?<br><br>that is what you're trying to do, correct? <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
yea, thats it!!!!!!, but whats the code for that????
 
well, if you're doing it directly in your report, all you need is to put in the control source of a textbox:<br><b>=[Total]-[Total of Delivered]</b><br>or whatever the names of the respective fields are.<br>no code necessary. you can put formulas directly into textboxes on both reports and forms.<br><br> <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
But the totals came from a query...how would I name the fields [total] AND [total of deivered] ????
 
do you have those totals on your report too?<br>if not, you can have them calculated on your report, the same way that you have them calculated in your query by making textboxes for each, and putting their formulas into them. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Ok, my report has a columm of Total Shipped and Total Received. Now what code would go in the Textbox to show the addition of Totalshipped and TotalReceived, without touching any query??????
 
so TotalShipped is the 885, and TotalReceived is the 4?<br><br>if this is correct, then put in the textbox<br><b>=[TotalShipped]-[TotalReceived]</b> <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Thanks a lot!!!!!!! IT WORKS!!!, Now, I am just left to the Mutiple table problem... :(
 
one down, one to go, and a million to come. for every problem you fix, you'll discover 10 more, but that's the joy of it, there's always a new challenge and something new to learn. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><i>Unreal </i></b>! <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top