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

Showing calculation output in form into table and reports

Hoping someone can help me out here. I have a form which performs calcualtions in it. The form was build using a table with the exact same fields. I placed the one expression in the actual field where the expression is kept. The expression is as follows in a field called Primary Total

=[Exchange Mail - Win2k_Label]+[Exchange Mail - Win2k]+[Domain Controller Servers]+[Mailbox Hub Servers]+[Mail Monitoring Server]+[Blackberry Servers]+[OGD Servers]+[Mailbox Restore Servers]+[SAV Server]+[Novell OA - NT5X]+[Utility Servers - Compaq]+[Novell OA - NW5x]+[Utility Servers -IBM]

The other expression is in a filed called Primary HC. That expression is

=[Primary Total]/30+[Secondary Total]/50

Can anyone help please ?
Oct 24 '06 #1
4 3225
Tanis
143 100+
If you can perform your calculations with a query, you don't need them in a form. As your report is based on a query, it is isn't it? use that as the record source for your report.
Oct 24 '06 #2
thanks for your quick response Tanis. Sorry I'm fairly new to Access 2003 ..Ok so I need to put the expression into the query for the filed Primary Total let's say. So when I run the query I should be able to see all records and their primary total ? Your help is greatly appreciated. I want ot be able to run the query and show all records or be able to specify by customer name and or date range
Oct 24 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
Don't do these kind of calculation here. Leave the fields blank and set them in the On Load Event of the Form as follows:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form_OnLoad()
  3.  
  4. Me.[Primary Total] = Me.[Exchange Mail - Win2k_Label] + Me.[Exchange Mail - Win2k] + Me.[Domain Controller Servers] + Me.[Mailbox Hub Servers] + Me.[Mail Monitoring Server] + Me.[Blackberry Servers] + Me.[OGD Servers] + Me.[Mailbox Restore Servers] + Me.[SAV Server] + Me.[Novell OA - NT5X] + Me.[Utility Servers - Compaq] + Me.[Novell OA - NW5x] + Me.[Utility Servers -IBM]
  5.  
  6. Me.[Primary HC]=[Primary Total]/30+[Secondary Total]/50 
  7.  
  8. End Sub
  9.  
  10.  
Also by doing it this way you can store the values in the corresponding fields in the table by setting the control source of the textboxes to their corresponding fields in the table.
Oct 25 '06 #4
Tried this and it still doesn't seem to work. I added the code in the form property and placed the code as an event to on load. I get no errors however I cannot see the calculation appearing in the field on the form or in the table ?
Oct 25 '06 #5

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

Similar topics

0
by: maceo | last post by:
I have some code that extracts the data from a table and performs a calculation (total time) on one of the columns. Here is the code: <?php /* Database connection */
3
by: RC | last post by:
I can't quite grasp the concept of creating custom reports depending upon what options a user picks on a Form. For example, the user clicks on a "Print Reports" button and a Form pops up. On the...
1
by: rc | last post by:
reposting from comp.database.ms-access "rc" <robert.cipriani@us.army.mil> wrote in message news:ayLtc.27697$0X2.969222@twister.tampabay.rr.com... > I have a table with a single record that...
2
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that some of the...
5
by: Greg Teets | last post by:
I am running an Access report from VB via ADO. The report has a field that shows the date it was run. How can I return the data from this field to VB or have Access post it to a table when the...
3
by: Dirk Goossens | last post by:
Hi! I stored the file name and path of photos in a table with data from students and teachers. Is there a way to show the photos in a report or form? Thanks! Dirk Goossens Vrij Instituut...
5
by: rogerzar | last post by:
Hi all In my application I am displaying bipmap image I am using the log10() function, but it takes very long time to display the image, the pixel array size is 1272x1003 pixels. I am...
4
by: wrldruler | last post by:
Hello, First, I know it's against "Access Law" to save calculations in a table, but....I want/need to. I currently have sub-totals being calculated inside a form, using DMax, DCount, and...
1
by: dosingh | last post by:
i've put this page together using asp, html, javascript amd flash. java passes a number of variables over to the flash file but the flash graph does not appear. The error which appears is...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.