473,416 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Dusm with Multiple Criterea from a Form

2
I have been trying for several days to work through the syntax of the DSUM function in an access query to create a running total of an inventory project of part totals that is tied to both the Part Number (PartNum - Short text) and the Lot Number (LotNumber - Short text) of that part. The table is InventoryLog, and the field i'm looking to sum is Total which is a calculated field of the Quantity In (QtyIn - Number) minus the Quantity Out (QtyOut -Number) in each record.
The query syntax I am using is:
RunningTotal: DSum("Total","InventoryLog","PartNum='" & [Forms]![Inventory Log]![PartNum] & "' AND [LotNumber]= '" & [Forms]![Inventory Log]![Lot Number] & "'")
The SQL statement is:
SELECT DSum("Total","InventoryLog","PartNum='" & [Forms]![Inventory Log]![PartNum] & "' AND [LotNumber]= '" & [Forms]![Inventory Log]![Lot Number] & "'") AS RunningTotal, InventoryLog.PartNum, InventoryLog.LotNumber, InventoryLog.QtyIn, InventoryLog.TransDate, InventoryLog.Initials, InventoryLog.Disposition, InventoryLog.WorkOrder, InventoryLog.QtyOut, InventoryLog.Comments, InventoryLog.Total
FROM InventoryLog
WHERE (((InventoryLog.PartNum)=[Forms]![Inventory Log]![PartNum]) AND ((InventoryLog.LotNumber)=[Forms]![Inventory Log]![LotNumber]));

When the query is run I get the final total of the PartNum/LotNumber combination, but not a running total for each record.
I have an intermediate knowledge at best of access, but i'm certainly no expert. Any help you can offer will be very appreciated.
Aug 31 '22 #1
0 3892

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

Similar topics

4
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the user to complete before leaving the form or moving...
3
by: Bill | last post by:
Is there a way for a web form to submit to another web form and still use the form elements like text box's etc..? It appears that the second page would not know what form elements were on the...
0
by: Stanley | last post by:
For a multiple independent form application of VC.net 2003, how to program a button in Form 2 to make it have the ability to jump back to the starting form ?
2
by: jamieda | last post by:
I have a multiple items form displaying the contents of a table. It has a primary key and the records are ordered by this. I want to be able to manually select a record in the form and then...
10
reginaldmerritt
by: reginaldmerritt | last post by:
i wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.fieldname01.backcolor = makes refrence to all fields called fieldname01...
4
by: gblack301 | last post by:
Hi, I have a search form where the user can check a box or enter some data such as a name to quey the database. I was wondering what is the best way to enable the ability for a user data in more...
3
by: Redbeard | last post by:
I am running Access 2010 and have an understanding of VBA Code, but not much coding experience. I would like to know if there is any way of running a Multiple Items Form off a Stander Form. To...
3
by: ashleybeck | last post by:
Hello! I have a multiple value form: sbfrmTests_multi *Please ignore sbfrm - at present that is the name, but it has no parent. - Form use: select tests and insert them into a template with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.