473,399 Members | 3,302 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,399 software developers and data experts.

Updating a table through a subform.

Hello everyone,,,

Here is my problem,

I'm using MS Access, I'm building a mobile inventory system.I have a table (Products) and I want to update the Quantity of mobiles each time I perform a sale operation. Sales operations are performed through a Form(Invoice) and in that form I built a subform-that was built using a query- where most of the sale details are specified. However, I don't know how I can subtract the quantity entered in the subform from the table's (Products) qantity to indicate the number of the remaining mobbiles.

Thank's a lot.

paolo.
May 5 '06 #1
3 1449
wlc04
70
In the form footer you could try adding a text box then perform the calculation there to give you a new total of the remaining inventory. You will need a total of the items sold from the subform first.
May 5 '06 #2
CaptainD
135 100+
You state "quantity of mobile" are you talking one item called "mobile" or you have different types of products ? I assume "Products". I also assume your invoice is like:
Qty Item price Total
2 Antenna's 10.00 20.00
1 AT1234 Battary 26.50 26.50

Total 46.50

Now, how are you displayng the information and how are you storing the invoice records?

I assume you have a Sales table with each invoice having a unique ID that ties the invoice to the sale and has the purchase product ID for each item purchase along with quantity etc.

On what ever you use to close out the sale or create a new record could run an "Update query" that updates the products table from the sales table for that invoice. That way each item pruchased is updated.
May 5 '06 #3
Thank's every one.

Yes I do have more than one product and they are included in the "Products" table. The sale details are included in a table called "Invoice Line".

Now my question is...What is an "Update query" ?
May 6 '06 #4

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

Similar topics

1
by: aaj | last post by:
Hi all I have a main form looking at a main table, with a subform looking at a detail table, linked by a key. There are many entries in the sub form bound to the single entry on the main form....
5
by: Mary Litten | last post by:
Hi - (This is my very first post) I have gotten to this point of registering to post because I have been spinning my wheels so long, I believe I am all caught up in the weeds. (and mud) I have...
6
by: cyoung311 | last post by:
I'm trying to do an automatic update of one table from another through a form. Basically, when a selection is made for an item, in this case a particular workshop, I want to get the associated...
4
by: Laura | last post by:
Here's the situation: I'm trying to use an update query to copy data from one row to another. Here is the situation: I have 5 companies that are linked to each other. I need to show all 5...
5
by: Richard Stanton | last post by:
Hello all My database has a main form linked to table1. It has several subforms on the main form, all linked to table2. Table1 and Table2 are linked by primary/foreign key, no duplicates...
1
by: abefuzzleduser2 | last post by:
we use Access 2000 with linked tables in SQL Server 2000. I have a form and a datasheet subform based on a table. This was not related to the parent table before and I was changing nvarchars to...
1
by: rdemyan via AccessMonster.com | last post by:
My App has 10 or so tables that we provide that contains proprietary data. This data will need to be updated once or twice a year. I would like some comments, suggestions on my proposed strategy...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
6
by: Dave | last post by:
I want to put the information that the user selects in my combo boxes into a subform that lies on the same form as the combo boxes. Thanks for your help already, Dave
2
by: adigga1 | last post by:
Good Day Experts, I have an issue dealing with a subform operation whereby, each time I select the value field of the subform, that same value is then placed into the source table as a new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.