Multiple Line Items to Calculate Square Footage

Posted on 2003-12-12
Last Modified: 2012-06-21
I'm building an access 2000 database for our construction division to use as an estimating tool.  They are currently using an excel spreadsheet that has over 200 pages.

I have built an entry screen for the individual items they use in projects, but now I need to build an entry screen for things that are calculated on square footage per linear foot, and the unit cost is based on the guage of the materials being used.
I do understand the calculation, I'm just having a hard time deciding how to get the information in to perform the calculation.


Duct A    Duct B  Total Linear Feet   90 degree elbow Offset

are some of the column headings in the excel spreadsheet.

The spreadsheet then takes the total linear feet and there is a multiplier used that tells how many units of each item is needs for each linear foot, and then the total of all these items is added together and multiplied by the unit cost.  There are also different guages for each of the column heading items that are based on gauge and then a calculation is done to calculate total man hours needed.

I feel I can write the code for the calculations, I just can't figure out how to design a form to get the information in.

Any suggestions?
Question by:dcphilli
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4

Expert Comment

ID: 9930456
You could create a linked table to the Excel spreadsheet. You can create a "named range" which would identify the exact data that you want to use for your table. When you setup the linked tabled to access, the program will see the named range you created and you can then create the linked table.

Once you have the data in the table you can just pull the info into the form.

Author Comment

ID: 9930481
I was actually trying to get away from the excel spreadsheet because it was so huge they have a hard time using it.

If I am understanding you correctly, they would still have to enter the data on the excel spreadsheet.


Assisted Solution

NowaY earned 125 total points
ID: 9930553
Well, instead of setting up a linked table, you can inport the data from the Excel spreadsheet so you wouldn't have to use it anymore. You can then create the form in Access to let them enter the data there.
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

LVL 17

Accepted Solution

walterecook earned 125 total points
ID: 9930631
Is it necessary to even store the calculated value?  (sometimes it is) Usually you don't want to store a calculated value in your database, rather you just calculate the value when you need it.  

For instance you may store length and width.  Since you do there is no reason to store area.  If you need area you just query for length and width and multiply them when you need it.

That notwithstanding, what you could do is have a bound form that has, say 5 fields, for instance:
Total Cost

When you enter the first 4 fields you could then have a button called "calculate".  In its OnClick event have your formula.
me!totalCostField = me!length X me!width X me!depth X me!Cost
(and whatever other constants you have)

Does that help?

Expert Comment

ID: 9930666
Maybe I'm misunderstanding what is needed. I thought you were just trying to bring the Excel data over to Access and do the calculations from there. Am I wrong?

Author Comment

ID: 9941235
I'm trying to create it all new (and hopefully better) in access and eliminate the excel spreadsheet all together.  

I had been thinking that I just needed to make an input screen with the same text boxes as the excel spreadsheet, but I think I probably do need to store the calculated field, haven't completely decided about that yet, still trying to figure out where that information comes into play in the end result.

I was taught not to store calculated fields, but I was also taught that if you try to do calculations on calculations in reports you could get burned, so I think it may be best to store this calculation, because I know there will be additional calculations using it later.

Any suggestions or comments on that?


Expert Comment

ID: 9941369
The spreadsheets only store calculated values? They don't store the values that ARE calculated?

Author Comment

ID: 9941383
Yes, the spreadsheets store the values calculated on and the answer (calculated values) and then the calculated values are carried over to a summary sheet.  The goal here is to create an access system that will show the individual line items and total them into a summary sheet.  Right now the excel spreadsheet is so large, they did not print anything to show the individual line items, only the summary.  They want to be able to do something a little more professional looking that will show line items and summarize by categories.


Expert Comment

ID: 9941399
to do this correctly, you need to have the values before they are calculated. You can then create the calculations in Access with reports, etc.

Expert Comment

ID: 9941505
OK, you have to create the file yourself. First click on FILE -> GET EXTERNAL DATA -> IMPORT then find the file you are going to import then click IMPORT. Click ADVANCED. Select DELIMETED and {tab} by FIELD DELIMETER. Then put in your field information in the box below. When you are done, click on SAVE AS. Put in a name you will remember. Click on OK then FINISH to test it out. Now just put the name of the spec that you just saved in the docmd.transfertext in the correct place.

Author Comment

ID: 9948618
I think I'm going to use a combination of your suggestions.

I'm going to set up a form like the excel form and see how it goes from there.

Thanks for your suggestions

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question