473,732 Members | 1,936 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 2263
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
79485
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 test2 as b on a.acc_no=b.acc_no
3
1557
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, Lap
2
2034
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
2173
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 to mention the nuances of using Do While, Do until, Case statements If statements, IIF etc etc...)...
2
2314
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 updates in Access and read them back by means of update queries into the spreadsheets our marketing...
2
2959
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 reconstitute Excel spreadsheets and Word documents, etc. I don't need to be able to programmatically...
4
6408
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
3189
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 Sybase server and display a report. Since the queries return ADO recordsets from the Sybase server,...
0
864
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 developing a web page that displays data about customer service calls - all of the relevant data is...
0
8944
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
9445
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9306
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
9234
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
9180
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
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...
1
6733
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2177
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.