Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to write an estimationg program in Access 2007

Status
Not open for further replies.

Harshaw

Technical User
Mar 7, 2008
2
US
I am an estimator for an industrial and commercial insulation contractor. I have compiled an enormous amount of data over the years but I am still figuring all of my estimates by hand.
For instance, I might need to figure that a 3” pipe will be insulated with 2” thick fiberglass pipe covering. This pipe is outside, so it will need to be jacketed with .016” thick aluminum secured every 4” with sheet metal screws.
The 90 and 45 degree elbows need to be insulated with preformed fiberglass elbows and jacketed with preformed aluminum elbow covers. Every 15 feet there will be a pipe support. This line is a schedule 40 steel pipe and it has valves on it and each valve has a flange at both ends so the insulation for the valves will have to be big enough to fit over the flanges. Where the 3” pipe might require 2” of insulation, a 1” pipe might only require 1-1/2” of insulation. Each size and thickness has its own production figures. This is the same with prices for the types of insulation and jacketing.
I have compiled all of this information into tables. Where before I had to get out my books and look each up, no I go to my tables, find the amount per day, and calculated that by the number of items. I can look up each type of insulation for each type of fitting or valve and I can calculate how much time all of this will take. I can also look up to see what size covering will fit on a 3” flanged valve. I have another table that will tell me how many square feet of jacketing the pipe, fittings and valves will require. I have prices for all of the associated materials.
The same happens when I try to figure equipment or ductwork. We deal with many kinds of insulation and just as many jacketing and finishes.

I bought Access 2007 and have brought my tables in. I want to have a spreadsheet or form that will allow me to link this information together and make the proper calculations. I want to be able to change the pipe sizes or materials from a list and have the calculations adjusted accordingly.
Again, I have all of the figures; I just don't know exactly how to go about getting all of this linked together in one place. I have only dabbled in computer code writing and I really don't know very much about it. That is why I picked Access because I figured it would have about everything in it that I need. I know the layout of the form I need, I just don’t know where to go from there.
Any guidance would be appreciated.
 
Hi,

You will have to write Visual Basic code to do this. I don't see any way around it. The formulas that you spoke of would have to be included in the program. If you don't have any programming experience at all, you might want to take a continuing education course or buy a book and learn it on your own. Once you have enough experience to get started writing VB in Access, you could post questions to address specific issues that you have.

Good luck,

dz
 
How are ya Harshaw . . .

Quite a secnario your trying to pin down! Before you get too deep, be sure to go over and understand the following:

Fundamentals of Relational Database Design

Normalizing Tables

Table Relationships

It may not seem like it, but the references are worth their weight in gold . . . besides understanding access better you'll be able to ask more directly what your after.

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
I wouldn't worry too much about the VBA that will no doubt be needed somewhere along the line - as an Estimator you'll probably handle it fine! As FoxProProgrammer suggested, buy a 'how to' book, you'll pick up the basics of VBA quickly. And if/when you get stuck, there are lots of very clever people in these forums who'll help.

As a first step though, you will need to concentrate on getting your database schema right. Again, the 'how to' book will no doubt have a section dealing with database design and especially the principles of Normalization.

One of the key tables might be LinePart, which describes each part of a line:
[tt]
LinePartID LineSize PartType Insulation Jacket
509278 3 Straight 2 0.016
9038445 3 90° Elbow 2 0.016
-3756210 3 Flange 2 0.016[/tt]

I'd probably normalize this by having tables for:

LineSize (3", 2" etc)
PartType (Straight, 90° Elbow, Flange etc)
Insulation (2" Straight, 2" 90° Preform Elbow, 2" Preform Flange etc)
Jacket (.016" ...)
... and so on

The LinePart table wouldn't show Insulation really though... it would have a field called InsulationID, which has a Relationship with the table Insulation. Same with Jacket etc.

Once you have all the LinePart records specified, I imagine that you quantify the line parts, eg for a 40' Line:
[tt]
Qty LinePartID
38 509278 (3" Straight) (qty here refers to total straight line length)
2 9038445 (90° Elbow)
4 672008 (45° Elbow)
1 2008099 (3" Valve)
2 -3756210 (3" Flange)[/tt]

Once all the LineParts have been quantified, one should be able to use the tables related to the LinePart table to auto-calculate the Insulation, Jacketing, AssemblyTime etc.

Does this help any?

Max Hugen
Australia
 
This seems like a pretty big undertaking, but if you want to tackle this I would be interested in following this thread. I have built many similar applications. I would recommend that you use a site that allows you to post your database, then someone can link to it and make corrections or suggestions. You can see several examples where people make a link to a snapshot or the database. There are many free sites out there. What you are asking to do would be very hard to describe in a post. Posting an email is discouraged on this site, and many people are not comfortable conversing via email. Here are some other thoughts which echo a lot of what has already been said.

1) Do not focus yet on the user interfaces (forms) and code. In this type of application you need to get your schema rock solid. If you need to write code referencing fields (which you may) then your naming conventions needs to be clear or you will cause more work in the long run. There are many naming conventions out there, so google "Access Naming conventions" or "Sql naming conventions". This is why posting your database will help.

2)The hardest part for this type of application is handling the "Exceptions" and the "user judgement". I say this from experience. I think you may find that when you do your calculations you often have to make a judgement call for certain cases. This "exception" may be very easy for you to do because it is intuitive. For example maybe you add 3% for a 90 deg bend if it is outside but not if it is inside. These things can be handled, but you have to design and plan for them. Again this is way your schema needs to be rock solid.

3)You are going to have three types of tables (functional idea). One I call reference tables. These are the things that you probably already have with details on things like your parts. This is the library of data that draw from. You will also have "association" tables that define what parts can be but together. Sounds like you may have those already as well. Finally you will build a "project" table. This is where you data goes that builds your project. This holds all the parts and how they are related to each other for a give project. Your calculations are run off of this table.

4) If your schema is well defined then you can do most of your calculations in queries and "relatively" easy VB code. So once your tables are done then you need to focus on seeing if you can run some calculations.

5) Once that is all done then you can start worrying about a user interface.
 
I read Fundamentals of Relational Database Design, Normalizing Tables and Table Relationships. Yes very helpful. I also went out and bought The Access 2007 Bible.
I appreciate everyone's input. I am going to try and make some calculations work first as suggested. If anyone knows of something similar to what I am trying to do that has already been done maybe I could see it and modify it. Anyway, thanks to all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top