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

how can i update a calculated field in a report

I have a table called banktransactions in this table i have the following fields
date
details
dramount
cramount

i am using this table to create a report showing the transactions for a given period. the report asks for the starting date and then for the ending date and automatically displays the fields details - dramount and cramount field for that period. i want to include in my report a new field which will be called balance brought forward and it will be the total of the previous dramount field - cramount field for the period before the starting date.

for example i have the following data
date details dramount cramount

1/1/2011 payment1 35

3/1/2011 payment2 45

3/1/2011 receipt1 100

10/2/2011 payment3 20

15/2/2011 receipt2 40

18/2/2011 payment4 10

if i give as a starting date the 01/02/11 and as an endinf date the 28/2/2011 i want to have the following result in my report.

balance brought forward
20
date detail dramount cramount

10/2/2011 payment3 20

15/2/2011 receipt2 40

18/2/2011 payment4 10

new balance 30

please someone help because i am stuck
Feb 7 '12 #1
5 1596
NeoPa
32,556 Expert Mod 16PB
Access reports have a feature (TextBox.RunningSum) whereby a tally can be kept of the calculations so far.
Feb 7 '12 #2
I am using the running sum for the totals of the dramount and cramount fields, i can figure out how i am going to have the total for the previous month as i explain above
Feb 7 '12 #3
NeoPa
32,556 Expert Mod 16PB
Instead of filtering the report as you normally would, so only those records that appear on or after the start date are included, process the data from the start and simply cancel the printing if the date is prior to your specified start date.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
  2.     If Me.Date < datStartDate Then Cancel = True
  3. End Sub
Feb 8 '12 #4
Is working fine now, thank u. The only thing that i can not manage is the field balance brought forwardwhat command shall i use in order to have automativally there the result of the calculation [dramount]-[cramount] for the dates before my starting date
Feb 8 '12 #5
NeoPa
32,556 Expert Mod 16PB
Your control where this is calculated, and which has .RunningSum set as True, should reflect this already if it's been set up correctly as explained.
Feb 8 '12 #6

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

Similar topics

2
by: Manfred | last post by:
Hi Would like to add a new Field to Table which is 75 % (or another Percentage) higher than the Value in another Field in same Table.Is this possible with Expression or would I have to enter the...
2
by: Mark Kola | last post by:
I have ran into an interesting situation. I have a calculated field based on a combobox column that somtimes is not requerying when I change the combo box value. Combobox cboCustomer 2...
2
by: Norma | last post by:
I have a table with a UPC#, CasesCompleted, TotalHours, standardGoal (pieces per hour) I am generating a report that groups by UPC and figures out production goals. In the Detail section of each...
2
by: hhathome | last post by:
In my report I have a calculated DateDiff Field, I also have a calculated count field. I'm trying to get a total of the DateDiff field and dividing it by the count field and I'm having problems --...
4
by: Apple | last post by:
Can I edit an calculated field in my form if needed. Thank you in advance for your help. Sincerely Apple
2
by: John | last post by:
I am using Access 2000. One table in my database has a field called RankName. Values inlcude: Officer, Sergeant, Lieutenant. I need create a report that groups these three RankNames into two...
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
9
by: Haas C | last post by:
Hi all! Is there anyway I can override a value in a calculated field on a form? For example: I have a form which displays the following fields based on a query: Premium Due field has the...
3
by: Ciara9 | last post by:
I am having problems trying to update a field in a database using a field in a form. I currently have two fields, Today and Tomorrow in a table named Date. The Today field automatically defaults to...
3
by: Daryl Austin | last post by:
I have created a mileage report in access. I created a calculated field called "mileage value" that takes field Mileage x field IRSRate. Each is for a given date field in a table. This works fine...
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:
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
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...
0
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,...
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
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...

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.