DSum Not Coming Up With Correct Total

Sep 6, 2012

I have an Inventory DB Table called [EngData] that has a subform table called [Inventory]. I have in the subform a calculated text box that Sums three columns, StockQtyMade, StockQtySold and StockQtyShrink. This works perfectly.

On the Main form I have a calculated text box that references the subform calculated field. This also displays correct info.

On another Form I wanted other users to see the total stock on hand by using a calculated field called PullTotalQty. This is set by using DSum(...). The only problem is that the DSum(...) keeps giving totals that are not accurate. Sometimes the quantity is a few pieces less then the correct amount and in other cases the qty is many times what it should be.

Whatever the amount in error it is consistent each time a particular record is displayed. I have tried many things to get this to work but nothing has fixed the issue. I have also tried changing the query and nothing works. Changing the query and using the [Inventory] table in the DSum domain gives a different wrong quantity.

Here is the code: I reduced the code down to one column to be summed (StockQtyMade) just to see if I could get that working first. I will add the other two columns later. for testing purposes I am only looking at the StockQtyMade amounts.

Me.PullTotalQty.Value = DSum("[tblInventory subform].[Form].[StockQtyMade]", "[SumStockQuery]", "[tblInventory subform].[Form].[PartID]= " & Me.[ID])

Here is the SumStockQuery SQL:

SELECT Inventory.TransactionID, Inventory.PartID, Inventory.PrintNo, Inventory.StockRev, Inventory.StockQtySold, Inventory.StockQtyMade, Inventory.StockQtyShrink, Inventory.StockQtyXIncomplete, Inventory.StockLoc, Inventory.TransactionDescription
FROM Inventory
WHERE (((Inventory.TransactionDescription)<>"xNextOP"))
ORDER BY Inventory.TransactionID DESC;

Why the totals are incorrect??

View Replies


ADVERTISEMENT

Queries :: Make DSum For Products Coming In And Out?

Nov 9, 2014

I am trying to make a dsum for products coming in and coming out. find the example below

Products In
Apple 10
Mango 5

Products out
Apple 5

Now I want to show statement for sum as follows

Product. In. Out. Net in hand
Apple. 10. 5. 5
Mango. 5. 0. 5

But it is showing only

Product. In. Out. Net in hand
Apple. 10. 5. 5

what I understand is dsum cannot find the out field for mango as there is no field found for mango

View 14 Replies View Related

Dsum (Not Appear Correct Calculation)

Aug 16, 2006

first of all sorry to my poor English

I have subform of inventry Transaction there are field productId, UnitsSale, SalePrice

I am using combo box on productId and want to calculate When i change productId (Stock in hand to show on msgbox) for the productId which i choosen from combo box


if any one know about it please help


Baig

View 1 Replies View Related

About Dsum Or Running Total.

Apr 22, 2008

Hi,

i'm working on a report about firm's personal. i have to calculate a column as running total. But i could not.
Please help me.
i am sending my file.

best regards.

View 4 Replies View Related

Forms :: Trying To Create A Running Total - DSUM?

May 9, 2015

So I'm trying to create a running total, to be able to graph a cumulative total. After looking around, I think I've figured out that I need to use a DSUM formula.I basically want to get a cumulative sum of profit in the 4th column.

View 7 Replies View Related

Using DSUM With Textboxes - Display Total Of Hours Based On Date

Jan 19, 2015

I am having difficulty getting a second textbox to display the correct total of hours based on a date entered into a first textbox.

Setup:

Table Name: TestTable1
Fields: 'RequestDate' & 'Hours'
Form: 'Form1'
2 Textboxes Unbound: Named 'Date' & 'Total'

What I am trying to accomplish:

Based upon a date entered into the "Date" textbox I want the "Total" textbox to display the total hours associated with that date.

What I have tried:

I have tried using, in the control source property of the "Total" textbox, many iterations of both Sum(IIF & DSum(

I am currently using the following:

=DSum("[Hours]","TestTable1","[RequestDate]='Forms! Form1!'Me.Date'")

I have tried this without the Forms designation; without the "Me" designation; Etc.

Some attempts return the Error or Name error while other efforts return a blank textbox...

View 4 Replies View Related

How I Can Calculate Correct Total Hours In MS Access 2003

Jul 26, 2006

I have a problem with Microsoft access 2003. I want to design a Check in/Check out Time Data base for my university final term project. In this data base I need to show the total of the working hours of each personnel in a month.( for instance: 124 hours and 55 minutes in one month). But adding up the hours, when the time variable reaches 24 then time automatically goes back to 01:00. As a result, the correct total hours cannot be calculated....

View 1 Replies View Related

Forms :: Restrict User To Enter Data If Dsum Exceeds Total

Sep 8, 2014

I need to be able to restrict users enter a value in the text box (on Form B) called "FTE Assigned" if Dsum of a field called "FTE Allocated" in another form A is less than what is going to be sum of FTE Assigned after the value is entered.

Both these forms are used by users to enter data in the 2 separate tables which are linked together through a join.

Master table - having FTE Allocated values and secondary table having FTE Assigned values.

Basically a message box would do if Dsum (of FTE used) is coming out higher than FTE allocated.

View 4 Replies View Related

Subform Correct Answer Adds To Number Correct In Main Form

Mar 2, 2012

The code I have is.

Code:
Private Sub Command26_Click()
If Forms![test site]![prp test].Form.[A Right Answer] = -1 Then
Forms![test site]![number correct] = Forms![test site]![number correct] + 1
End If
DoCmd.FindNext
End Sub

Then when clicked it checks a yes/no box to see if "A right Answer" is the correct yes. Then it should pop to the main form and take the number correct cell and add one to it. I am trying to get the record to go to the next record inside the sub-form but docmd.findnext seems to be wrong too.

View 4 Replies View Related

Comming To Coming

Feb 8, 2006

Hi allive just been asked this by a co worker on a remote sitethey have a client name they want to input to a table in Access 2000in a surname field which is just a txt fieldthe name to be input is 'comming'when they tab to the next field access changes it to 'coming'i tried it this end in a new database and it does tha same thing ..and in Acc 97any thoughts ...or a fix?Thanks

View 3 Replies View Related

Coming Up With A Formula To Calculate Age.

May 4, 2005

I have built a table with a field name of Birth date and have applied an input mask to have the data shown as: ##/##/##. Now, I would like to have another field labeled age. Is there a formula that I can create to have access calculate this in my table? I have tried "=mydate()-"Date Of Birth"" in the validation rule under the properties of the Age field; however, I keep getting an error. Any suggestions?

View 2 Replies View Related

Database Window Not Coming To Front

Sep 15, 2006

This is I think a very simple query.

with a number of forms/ queries etc open and you click on at the back it is not coming to the front for amendment.

It is probably an indicator somewhere but I just can't find it

any help appreciated

Ta

humph

View 3 Replies View Related

Over Coming Slow Network Speed

Nov 6, 2006

Hello,
I have split a database useing the database spliter wizard. But I still have network speed problems. What I am wondering is if anyone knows if useing an ODBC connection between the front and back ends is more efficient than file sharing across the network?
Thanks for any information on this
Tim

View 4 Replies View Related

Maximized Form Coming 'unstuck'

Aug 15, 2006

Thanks if anyone can offer a suggestion, I cannot find a similar problem described on the forum.

I have a form which runs at startup maximised. Pop-up and Modal are set to 'NO', Auto Resize and Center are also set to 'NO', Border style has been set to various settings, and Moveable has also been tried at 'YES' and 'NO'.

A command button on this form opens another form with the same settings which I want to take the original form's 'place' in the application window.

This all works fine, just that when I close the second window (using DoCmd.Close), the original window is then no longer maximised underneath it. I want to make sure certain windows are maximised at all times.

I know I could hack this with a DoCmd.Maximise somewhere, (or by switiching to full Pop-up/Modal mode and hiding the Application window) but the results of these are all a bit of a hack.

Can anyone shed light on the mysteries of Access's default form maximisation behaviour?

Or does anyone do what I have described successfully?

View 4 Replies View Related

Records Coming Through In Wrong Order!!

Aug 19, 2005

Hi,

i was working with a database and accidently deleted the first row, i couldnt get the automatic number to number another row 1, so i took out this table and created another one. however even though my new record is in order, when i pull this through to the website it's coming in the order 1,3,4,5,6,2... and the coding for the page worked fine with the db beforehand!!! so now i'm a bit lost

if anyone has any ideas, they'd be appreciated!!!

Thanks in advance!!!
Megan

View 14 Replies View Related

Coming Back From Report - Form Out Of Position

Jun 23, 2006

hi i have a button that loads a report. If i then close the report the form, which is set with no border/no max/min/close/non movable and opens maximised, places itself off centre. I want it to stay maximised full screen. The only work around i currently have is when the use moves the mouse over the form it maximises itself. Will this then be calling this function everytime the mouse moves(cant be very efficient). is there a better way to maximise the form Immediately after closing the report.

View 5 Replies View Related

Forms :: Prevent Button From Coming To Top When Focused

Feb 22, 2014

I currently have a button with a checkbox on top (z-axis wise). This works exactly like I want, except that whenever the button is clicked or focused, it gets brought to the top and hides the checkbox. The only idea I've been able to come up with is maybe making the button completely transparent, with an image of a button behind it.

View 1 Replies View Related

Export To Excel Coming In Chinese Instead Of English

Mar 20, 2015

But in my access database I have a SQL code in which excel sheet opens automatically with required data. Now problem is one column in the excel sheet since this morning is showing up in Chinese instead of English. I don't know what to do.

View 1 Replies View Related

Property Sheet Not Coming Up Although Tab Exists On Ribbon Bar

Mar 24, 2015

I have recently split my DB and distributed the front ends to respective users. I dont know why for this particular user, the property sheet does not show up even though the the Property sheet button is clicked on the Ribbon bar. For others it seems all fine. This user runs on 2 monitors , but that should not be a problem I guess?

I am currently running 2010 version , and i have tried doing run>msaccess/safe which does not work.

How the user can customize reports or queries , or I can modify designs if I want to on his front end...

View 3 Replies View Related

Tables :: Autonumber From Table1 Not Coming Across In Number Field In Table2

May 5, 2013

I have created 2 tables:

StaffID
StaffTrainingID

Table 1 (StaffID) - contains all personal details in the form of forename + surname + position + email + contact numbers ect. Each field/person has an autonumber.

Table 2 (StaffTrainingID) - contains all mandatory training/lectures (18 fields in total). I don't wish to list each staff member again in table 2 so have put a StaffID field in (data type is number).

However, when I try to type in the StaffID number in that field so I can link that person to the relevant training he/she has taken, Access won't allow it.

View 4 Replies View Related

Forms :: Multiple Field Screen Search - MSG Box Not Coming Up If No Records Found

Aug 18, 2015

I have created a multiple field search screen. The script is attached.

I would like to add a MSG Box "No records found" when the user types in information in any field where no records are available.

Just cannot get this working.

View 10 Replies View Related

Queries :: Self-Referencing Running Total Used To Calculate Next Total In A Query

Jul 23, 2015

I am trying to create a query that has a self referencing running total based on the values (point totals) of itself (running total of values in the running total column that have already been calculated for all previous records) plus the total of new points being added in the current record, less the total of points being removed in the current record. This running total can never go below 0, if it does, the running total should restart at zero and add in only new points and begin the process again with the next records

I am able to do this in Excel in less than two seconds so I know there has to be a way to port this into a query. I've attached an excel example of what I am exactly trying to do

If it takes multiple queries to complete the required output I am ok with it. In my previous outtakes I have had up to 8 queries but just couldn't seem to do it..

View 9 Replies View Related

Total Daily Sales Queries By Model/Total

Mar 8, 2008

Hi,

1) I am pretty newbie to this access programming, do forgive me if my questions sounds stupid.

2) Basically I create an application in access capturing or production information for my company. now the top management suddenly wanted whats their main concern:- Total Daily/Monthly, Quarterly, Annual Sales (By Model If possible)

3) I start with daily (Lets don't be too overly ambitious).

4) I try to let user select dates from my calender control and reflect daily sales (in Total & By Model break down) insert into my form.

5) Understand someone told me from my previous post in Calender control I can achieve it either through forms or queries, which is a better way. (in terms of flexibility to change for program maintenance/ scalibility) wise ?

PS: Please forgive my ignorance :o:(

Thanks (In advance) & God Bless.

View 2 Replies View Related

Tables :: Get Total Of Clip Size And Also Total Of Clip Duration

Dec 31, 2012

I have a table with 4 field which describe clips.

ClipName (txt)
ClipSize ( Long Integer)
ClipDuration (HH:MM:SS)
Date created (dd/mm/yy).

I would like to get the total of ClipSize and also total of Clip Duration either in table down or in query.

View 13 Replies View Related

Should I Use DSUM?

Jul 30, 2007

I want to add to values based on if yes or no is selected in an option group.

My thinking is to use DSUM. When 'yes' is selected I want to grab a value from one field and add it to a value in another field giving a running total. I am currently using the following code but it throws back an error. Is DSUM the way to go?

Case 1

txtTotal.Value = DSum("[s1]", "[s2]")

View 3 Replies View Related

Using Dsum()???

Mar 29, 2008

Hi there guys, ill keep it short and snappy,

Im trying to use the Dsum() function to add together the "Quantities" of specific products bought in transactions i.e. the total quantity for a product called "red t-shirt" and the total quantity for another product called "blue t-shirt". the following was the code i tried to use but it just adds together all quantities of all products:

DSum("[Quantity]","Query2","[Product Name] =[Product Name]")

Does anyone have any ideas at all please?

Thanks

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved