473,587 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dusm with Multiple Criterea from a Form

2 New Member
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","I nventoryLog","P artNum='" & [Forms]![Inventory Log]![PartNum] & "' AND [LotNumber]= '" & [Forms]![Inventory Log]![Lot Number] & "'")
The SQL statement is:
SELECT DSum("Total","I nventoryLog","P artNum='" & [Forms]![Inventory Log]![PartNum] & "' AND [LotNumber]= '" & [Forms]![Inventory Log]![Lot Number] & "'") AS RunningTotal, InventoryLog.Pa rtNum, InventoryLog.Lo tNumber, InventoryLog.Qt yIn, InventoryLog.Tr ansDate, InventoryLog.In itials, InventoryLog.Di sposition, InventoryLog.Wo rkOrder, InventoryLog.Qt yOut, InventoryLog.Co mments, InventoryLog.To tal
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 3903

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

Similar topics

4
4032
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 to the next record. So, in the BeforeUpdate event of the form itself I have the following code:
3
1147
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 first form. How should this be handled? I know you can do it using the request object but I rather use the form elements if possible. I need to do this because my application is a multiple page form, where the next form is dynamic and depends on...
0
1093
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
2994
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 reference that record using VBA. However, I do not know how to create a recordset with that single record. I am using Access 2007. Thanks in advance.
10
9156
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 on the 'multiple items' form and therefore all fields change colour not just the current record. How do i refer to the current record with field named fieldname01? Thanks :)
4
1939
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 than one field or check muliple boxes to query the database. What I want to do is create a multiple search criteria data string. Below is the code that working with a the moment. Any input would be appreciate. Thanks Greg If...
3
2141
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 explain, I have a main form for my database that displays all my records 1 at a time. The form has around 50 fields and a large photo for each record. I also have a Multiple Items Form that shows six fields and a small thumbnail photo for each record that...
3
919
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 the same templateID. I have a static table: tblTests -A table of tests, to populate the selection options (Checkboxes) on sbfrmTests_multi
0
7924
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7854
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8349
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
7978
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
6629
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3845
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
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
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
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.