Calculations in Forms

jojo86

Registered User.
Local time
Today, 09:55
Joined
Mar 7, 2007
Messages
80
Hi

I have another post at the moment but this one is important too.

I have a form that calculates the yield using these steps:
1. User selects the location and characteristics of the site
2. The density automatically shows
3. The percentage is from the first tab on the form
4. The user selects the Type of Mixed Use and the mixed use ratio automatically shows
5. The new site area is calculated and the yield is then calculated

This form (Frm_Yield) is a subform of the primary form (Frm_Primary) and works the way I want it to.

However, I am now trying to create a report so that it shows a TOTAL Yield calculation for all the records in the database. This is where I am stuck with why it wont show any figures and how to calculate it, but I think I know why it wont work even if I try to make calculations in the report.

I opened Tbl_Yield that holds all the information for Frm_Yield and noticed that it wasn't storing the yield and new_site_area calculations. I think this is because I am performing calculations for these fields in the control source. However, if I move this to an afterUpdate event or something similar, it wont do the calculations.

In order for me to create a report, I think this needs to be sorted first, so if anyone has any hints about what to do, I would love to hear them!

The db is attached as a zip file. Thanks :)
 

Attachments

1) You don't need to save the value which you can calculate always you need it.
2) If you want to save this, put your code (vba) in Form_BeforeUpdate.
 
1) You don't need to save the value which you can calculate always you need it.
2) If you want to save this, put your code (vba) in Form_BeforeUpdate.

So how do I go about making the report? I actually need many reports but they will all revolve around the total of yields for the every record.

What I would like for the first report is to make it calculate the yield by adding all the yields up for every site. In the database attached, it only has around 3 sites, yet in the final database has over 450 sites.

Can you help me? Thanks
 
Hello jojo86!

Send a short example of your mdb. Access 2000 or 2002.
I have seen your "Yield.zip", but there no "Reoprt".
How do you want your report looks like ???
 
Last edited:
The reason why there is no report is because when I tried it, nothing showed. All I would like on the report is the Yield figure for every site, the total of all the yields for all sites. I am assuming this is simple but still have no luck in figuring it out!
 
Hello jojo86!

Here it is, look at Query1, Report1, and don't complicate.
 

Attachments

Users who are viewing this thread

Back
Top Bottom