473,383 Members | 1,759 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,383 software developers and data experts.

how to use access to continually update and calculate

5
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 2249
missinglinq
3,532 Expert 2GB
What expression are you using to calculate the grand total and where does it reside?
Jul 20 '07 #2
Wiley
5
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
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 Expert 2GB
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
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
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...
3
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...
2
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...
3
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...
2
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...
2
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...
4
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...
1
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...
0
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...
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.