473,545 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to use access to continually update and calculate

5 New Member
I have created a form that contains 1000s of items, though I have an expression that have calculated the grand total. If I make any changes to my quantities the grand total does not change. Hence how do I use access to continually update and calculate the grand total in a form after each new entry.
Jul 20 '07 #1
5 2254
missinglinq
3,532 Recognized Expert Specialist
What expression are you using to calculate the grand total and where does it reside?
Jul 20 '07 #2
Wiley
5 New Member
I have created a form that contains 1000s of items, though I have an expression that have calculated the grand total. If I make any changes to my quantities the grand total does not change. Hence how do I use access to continually update and calculate the grand total in a form after each new entry.
The expressions I tried in my form I were QTY=SUM[STOCKIN]-[STOCKOUT], TOTAL=SUM[QTY]*[UNITPRICE] then for the grand total I tried =SUM[TOTAL], DSum("[QTY] * [UNIT PRICE]", "TOTAL') even DSum("[QTY] * [UNIT PRICE]", "Consumables'') but nothing seems to work.
Jul 23 '07 #3
Wiley
5 New Member
What expression are you using to calculate the grand total and where does it reside?
Oopps I think previously I replied to myself :
The expressions I tried in my form I were QTY=SUM[STOCKIN]-[STOCKOUT], TOTAL=SUM[QTY]*[UNITPRICE] then for the grand total I tried =SUM[TOTAL], DSum("[QTY] * [UNIT PRICE]", "TOTAL') even DSum("[QTY] * [UNIT PRICE]", "Consumables'') but nothing seems to work.
Jul 23 '07 #4
missinglinq
3,532 Recognized Expert Specialist
Assuming that your expressions are correct (only you know exactly what you're trying to do) in order to have it update when you change something, you need to recalculate your totals for the form each time you change the value of any of the fields that are involved in the calculations.

Expand|Select|Wrap|Line Numbers
  1. Sub YourControlName_AfterUpdate()
  2.  Me.Recalc
  3. End Sub
Linq ;0)>
Jul 23 '07 #5
Wiley
5 New Member
Assuming that your expressions are correct (only you know exactly what you're trying to do) in order to have it update when you change something, you need to recalculate your totals for the form each time you change the value of any of the fields that are involved in the calculations.

Expand|Select|Wrap|Line Numbers
  1. Sub YourControlName_AfterUpdate()
  2.  Me.Recalc
  3. End Sub
Linq ;0)>
Thanks missingling,
But still its not working I do not know what I did wrong, because I added the grand total text box under my totals. Maybe if I let you know what I did at first.
1. Qty the expression is [STOCKIN]-[STOCKOUT (this is how this is calculated)
2. Totals " [QTY]*[UNITPRICE] "
3. GRAND TOTAL, I used =Sum([TOTAL]) this calculates my total yes but does not update after changes. I have tried a combination of expressions and still nothing and I got Error! and Name?
should it be a problem using a calculated field to calculate another, is there ?
Jul 24 '07 #6

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

Similar topics

4
79447
by: gooday | last post by:
Table test2 has multiple amounts for each account, I would like to sum the amounts for the same account and use the result to update the variable 'tot_amount' in table test1. But SQL does not allow me to use sum function in update. Is there any other way to do this? Thanks. update test1 set tot_amount=sum(b.amount) from test1 as a join...
3
1536
by: Lapchien | last post by:
A user has a make table query, basically it does some summing and creates a 'summary' table. I'd like to get rid of it (it's the last one in the access back-end) and use pure sql. Is the same thing easy enough to accomplish in sql or would you still need to make the table in the FE and then update the (same) table in sql..? -- Thanks,...
2
2025
by: Noloader | last post by:
Hello, Access XP, SQL Server 2000 Is it possible to hide a SP under Queries in Access, yet still be able to Execute it from Access? (Similar to hiding Tables, then using Views) We hooked up a custom form to accept the input parameters (MS Feature Request!) for the Stored Procedure. We had two problems with MS's
3
2166
by: Iain Miller | last post by:
Can anybody help me with some Access 2000 code? I don't do a lot of coding in Access & so every time I come back to do something I pretty much have to relearn the syntax from scratch so this is taking me hours. As with most occasional programmers its the commas, colons, inverted commas, square brackets etc etc that cause the problem! (Not...
2
2299
by: Jim S | last post by:
To my surprise and chagrin, newer versions of Access have disabled the functionality that lets users change the data in linked tables that point to a range in an Excel workbook. This is "because of legal issues..." according to Office Support. I have other issues, specifically a couple of applications that do things such as calculate price...
2
2952
by: Stan Smith | last post by:
I couldn't decide which newsgroup to post this in so I thought I would start here. I can create an "OLE Object" field manually in Microsoft Access and insert an Excel spreadsheet or a Word document, etc. into the field. I would like to be able to programmatically do the same thing. Basicaly I want to be able to add and retrieve and...
4
6377
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database to look a and I am loosing tremendious amounts of time trying to organize it so that I could view it. Regards, Alexandre Brisebois
1
3178
by: sphinney | last post by:
All, I'm not sure how to adequately explain my problem in two sentences or less, so at the risk of providing TMI, here's the condensed verion. I have developed an Access 2002 database file that contains a form, multiple queries and multiple reports. The purpose of the form is to allow the user to run various queries against my company's...
0
861
by: jdirienzi | last post by:
I am in the unfortunate position of attempting to work with an Access database on a network share. My client has two separate access databases - one that contains all of the company's data and one that contains a full blown application (forms, module, reports, etc) that reads from the aforementioned data only access db. I've been tasked with...
0
7415
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...
0
7675
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7440
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...
0
7775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5997
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...
0
4963
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
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...
1
1902
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
0
726
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.