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) - =(Nz([Standard])+Sum(Nz([UnitsOrdered]))-Sum(Nz([UnitsUsed])))
3 2071
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) - =(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.
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.
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]","yourtablename")
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.
Sign in to post your reply or Sign up for a free account.
Similar topics
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
|
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 ...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
|
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...
| |