Having acces compute a formula

  • Thread starter Thread starter chang
  • Start date Start date
C

chang

I want it that i will have a form to enter information, i will choose from
a drop down a list a customer name (which all of his info gets enterd into
from another form). i will then coose a "pipe style" (i will have set the
ratio of weight per foot using a different form) the I want to be able to
enter the Metric weight of the sale and also enter the total price that i
am paying for it and the total price that i am selling it for. I then want
it to calculate the weight in "Short tons" (it is a simple mutiplication
formula) . I also what it to display the price per foot (for both me and
the customer) based on the ratio that is for that pipe style. and I nead it
to save the information.

I know how to do the basics, but how to set it up to deal with the formulas
and to save information is what i nead help with.
 
Hi Chang,

You need to break down what you're doing into small individual pieces and
then address those pieces one at a time. Probably best done with diagrams
and pencil and paper to start. For each part of your calculations you'll be
well advised to name and create a function procedure. Each of your
functions will return a result of a specified type to the calling code. I
would create those functions in a standard module rather than in a form's
module. Since you're doing this once you'll probably have future need for
the same or similar calculations in future applications. A module is easy
to import into your new applications.

You should NOT store the results of calculations in your database
application. Recalculate every time you need to see or report that
information. If you're creating invoices or the like you can create Report
Snapshots or export your reports to some other format outside your database.

You seem to be pretty ambitious about what you're trying to do with Access
so I recommend that you invest in some books. I could recommend a few but
so could others. Do a google search on "books" in the Access newsgroups and
you'll get a pretty good list of recommendations.

Also, if you haven't been there yet, visit www.mvps.org/access for highly
relevant Access lore and links to other Access resources.

HTH
 
Back
Top