By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,867 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Reading data from Access

P: 1
Access landed on my desk late last week at work, and I was told to try and make it work for us. We currently use Excel to store our data, which is a bit cumbersome. But it does allow us to make simple calculations in the data base. I was wondering how to pull values from fields so that some calculations may be made with the data and sent to another field.

I'm attempting to sum 7 fields (CaMass1, CaMass2...) and have them sumed to CaTotal.

Any help would be nice. Thanks
Oct 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: 11
For the purposes of niceness, I suggest that you use a form in datasheet mode. That is if you want it to look like a spreadsheet and have calculated fields.
You can just set the datasource of the form to the table holding the data and then add all the fields from the field list, into the detail section of the form. Set the forms mode to datasheet and it should give you the data.

To add the calculated fields, drop on a text box (in design mode) and set it's control source to =field1+field2+field3 (including the = sign) this should sort it out.

An option is to put the calculated field in the table but I think that it is generally best to stay away from making the tables too smart with lookups etc in them as this can lead to confusion on what the actual data is.

Good luck.
Oct 16 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Open a query in design view and then change the view to sql and paste in the following code (change TableName to your table name). Then save and run this query and see if it gives you the results you want.

SELECT Sum([CaMass1]) AS SumCM1, Sum([CaMass]) As SumCM2, Sum([CaMass3]) As SumCM3, Sum([CaMass4]) As SumCM4, Sum([CaMass5]) As SumCM5, Sum([CaMass6]) As SumCM6, Sum([CaMass7]) As SumCM7, ([SumCM1] + [SumCM2] + [SumCM3] + [SumCM4] + [SumCM5] + [SumCM6] + [SumCM7]) As CaTotal
FROM TableName;

Access landed on my desk late last week at work, and I was told to try and make it work for us. We currently use Excel to store our data, which is a bit cumbersome. But it does allow us to make simple calculations in the data base. I was wondering how to pull values from fields so that some calculations may be made with the data and sent to another field.

I'm attempting to sum 7 fields (CaMass1, CaMass2...) and have them sumed to CaTotal.

Any help would be nice. Thanks
Oct 16 '06 #3

Post your reply

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