473,789 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calculating totals

rcollins
234 New Member
I ahve a database that I put together to keep track of the office supplies. We input what has been purchased and what goes out. When I run a report, usually it is just for a month, but I have a calculation issue with this. If I run the report for the whale time we have used this database, the units on hand is correct. When I run it for specific dates, it only calculates the on hand for these times, throwing off the total of on hand supplies. I understand why it is calculating this way, but even if I run the report for just Jan, I need the total on hand to calculate from all of the entries not just Jan.
Access 2003 on xp machine
here is where I get my current on hand amount (on my form this total is right because it is pulling from all of the records)
Expand|Select|Wrap|Line Numbers
  1. =(Nz([Standard])+Sum(Nz([UnitsOrdered]))-Sum(Nz([UnitsUsed])))
Jan 17 '08 #1
3 2091
jaxjagfan
254 Recognized Expert Contributor
I ahve a database that I put together to keep track of the office supplies. We input what has been purchased and what goes out. When I run a report, usually it is just for a month, but I have a calculation issue with this. If I run the report for the whale time we have used this database, the units on hand is correct. When I run it for specific dates, it only calculates the on hand for these times, throwing off the total of on hand supplies. I understand why it is calculating this way, but even if I run the report for just Jan, I need the total on hand to calculate from all of the entries not just Jan.
Access 2003 on xp machine
here is where I get my current on hand amount (on my form this total is right because it is pulling from all of the records)
Expand|Select|Wrap|Line Numbers
  1. =(Nz([Standard])+Sum(Nz([UnitsOrdered]))-Sum(Nz([UnitsUsed])))
It sounds like you want the totals as of Jan. In your criteria for the date:

<=1/31/2008

This would give you the totals for all data through January 2008.
Jan 17 '08 #2
rcollins
234 New Member
not really, see I have criteria date input for start and finish dates, so the report we will run is from 1/1/08 to 1/31/08 which the user enters, but then it gives me an on hand total that only uses the used and ordered amounts for this time period throwing off the on hand total. I only want the report to show the transactions for this period, but want the on hand total to calculate from all of the records, which date back to 7/1/06.
Jan 17 '08 #3
jaxjagfan
254 Recognized Expert Contributor
not really, see I have criteria date input for start and finish dates, so the report we will run is from 1/1/08 to 1/31/08 which the user enters, but then it gives me an on hand total that only uses the used and ordered amounts for this time period throwing off the on hand total. I only want the report to show the transactions for this period, but want the on hand total to calculate from all of the records, which date back to 7/1/06.
On hand would be:

=DSum("[Standard]", "yourtablename" )+DSum("[UnitsOrdered]", "yourtablename" )-DSum("[UnitsUsed]","yourtablenam e")

If these columns are numeric values but some records may have null values, why don't you do an update query to set the Nulls to 0 so you don't have to worry about using "NZ". You can also set the default value of the columns to 0 so any future records don't have nulls in them.
Jan 17 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4867
by: The Bit Bandit | last post by:
Hopefully someone can help me create a query that I'm having some trouble with. I have three tables: invoices, invoicedetails, invoicepayments The fields are: invoices -------- InvoiceNo
3
1664
by: Paul Mendez | last post by:
Performance_Date SumOfBudget_NOI CurrYTD_BudgetNOI_Total 1/1/2004 $4,184,626.00 ? 2/1/2004 $4,484,710.00 ? 3/1/2004 $4,537,424.00 ? 4/1/2004 $4,826,850.00 ? 5/1/2004 $4,966,326.00 ? Can someone help? What I am trying to do is create a query that will end up looking like the bottom example. The above query is a calculated totals query with an...
2
35898
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to write the correct expression due to the "groupby" needed to group the city count in the first column. Any clues?
4
1036
by: coleenholley | last post by:
I have an ASP table that I need to convert to a datagrid, but I have calulations like this: row1.cell1(column1) X row1.cell2(column2) = row1.cell3(column3) I also need to get grand totals in the footer - I've found articles on how to do this in VB, so am good to go with the grand totals, but I have not had any luck finding articles with examples in VB on how to do calculations across a row in a datagrid. I REALLY need an GOOD...
2
2312
by: Tim Marshall | last post by:
Wondering if anyone has any suggestions for this. Sometimes in the form reports my users run, a data sheet subform on a main form, with totals in text boxes with calculated controlsources (=sum(whatever)), the records returned are large. By "large" I mean that there is a significant lag time before the totals get calculated and display. Lag time and what constitutes "large" varies with the user's PC hardware/configuration.
2
1876
by: mtchampi | last post by:
Hello all, I have a limited SQL background, and I am responsible for creating a monthly report that displays separate tables for the following: 1. Calculate individual monthly totals of files processed (created) that month 2. Accumulating totals per month, (eg. Jan 200 files, Feb 300 files, so Feb would now read as 500 files) 3. Take a constant number, say 10,000 records, subtract the year to date result(from the accummulating totals)...
38
9148
by: d0ugg | last post by:
I'm writing a program that will have to roll the dice A and dice B one million times, and calculate the percentage of times that the dies will be equal. I'm having trouble to figure out how the percentage will work. Here is my code: #include <ctime> #include <iostream> using namespace std;
3
4078
by: goldstar | last post by:
I currently have an order form, where a customer can place order for items and each time they select a product and quantity then add button, this adds the item to the listbox with the quantity total for each item. for example quantity= 10 * 19.99each the total 199.99 for each line will be displayed, i could get this to work so it adds the the total for each line to the listbox. but then i want to add all the totals up for this particular...
25
3217
by: Blaize | last post by:
Hi, I'm having an issue trying to calculate time. Its okay if the value does not exceed 24 hours otherwise I get a date and hours listed. For example, I have a loop which looks through a table and adds up the time spent. Dim TempCount As Date Dim DEVCount As Date Do TempCount = rst!wtime
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.