473,327 Members | 2,025 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,327 software developers and data experts.

Mathematical Operations between tables

I have tblInventory that contains multiple fields and the "Quantity" field. I also have another table tblInvoice containing multiple fields and the "Quantity Bought" field. How, whenever I enter a number in "Quantity Bought" to be subtracted from "Quantity"?
Dec 23 '16 #1
1 882
PhilOfWalton
1,430 Expert 1GB
Basically, you don't.
You should calculate the balance which is going to be something like

Balance = OriginalQuantity - DSum("QuantityBought", "TblInvoice", "InventoryID = " & InventoryID) + DSum("QuantityDelivered", "TblDeliveries", "InventoryID = " & InventoryID)

No Idea what your table structure are, it's all a lot of guesswork.
That is the normal way to do stock control, but I feel sure there are plenty of examples on the Web.

Phil
Dec 27 '16 #2

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

Similar topics

4
by: Jason | last post by:
I am going through the Geek Challenges on the Open Source Institute Website: http://www.osix.net/modules/geek/ The instructions for Level 4 are: "This challenge requires you to use some of...
4
by: Morten Aune Lyrstad | last post by:
Hi there! I'm in the process of writing a virtual machine for my script language, and I'm trying to determine the best way of handling operations on different types of data. My language supports...
3
by: Alexander Pucher | last post by:
Hi, given a table with some data, e.g. some monthly measures. Some of the measures are missing though. id m1 m2 m3 m4 m5 .... m12...
2
by: rameshadari | last post by:
Hello Guys, I am new to SQL Server Database programming. My specific question is:- Is it possible to do some mathematical operations on columns present in a table. If possible, How? For...
9
by: tomamil | last post by:
imagine that you have different matrices with different names and you want to perform the same action with each of them. is it possible to put their names into some array and to create a loop that...
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
7
by: Flavio | last post by:
Hi, I have been playing with set operations lately and came across a kind of surprising result given that it is not mentioned in the standard Python tutorial: with python sets, intersections ...
2
by: Madmartigan | last post by:
Hi Operating system is WinXP using SharpDevelop version 1.1.0 and build 2124. I'm new to C# and have a problem trying to get a user to enter 3 mathematical operators of choice, then 2 numbers...
1
by: Phox | last post by:
I'm learning Python, and as a small exercise I made for myself I'm writing a program to find the determinate of a 2x2 matrix. I'm running Python 2.5 on Windows Vista, here's my code. #for loop...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.