Set and Equation

K

Krefty

Good Day and thanks for looking at my problem. I have a
list of 806 locations within my business and I need to
calculate a "flow" total using LOOKUP or IF functions to
create a calculation.

I have roughly 15 company's that I use as a "make"
manufacture for Reg 1 Make, Reg 2 Make and RV Make. I
need to create something like a macro or querie function
that upon opening or forcing a manual running of that
macro, says. IF (plant/location) this breaks up the 806
locations.

(lookup reg 1 make) When reg 1 make = "Mooney" (The name
of this will have to change to meet the 15 differant
manufactures)

Then (lookup) and solve the equation for Mooney (In this
case or for this maufacture it is (1.29 Cg P1)

Cg and P1 are specific factors that I have in electronic
version and whcih Cg is used is based on "size" and body
class. This is in the same table of the "make"
and "plant/location".

After re-reading this it does seem very confusing but if
you could help me set up some equations or lookup or
macro functions I would greatly appreaciate it. Or if
you know of any links that you could give me to help me
solve this I would greatly appreciate it.

Thanks in ADVANCE.

Krefty
 
M

Michel Walsh

Hi,


You can store the data into a table, including the "name" of a VBA User
defined function of an object to be called. You can send that name to the
VBA6 function CallByName (see the help file), with the arguments you may
need to pass to this UserDefined VBA function. If the function does not need
any arguments, you can use, much simpler, eval( somestring ), to return the
result of the string:


? eval ( " 5*4-3 ")

17



A recordset can be use to "find" the appropriate record, in the table,
and to supply the "values" and the "strings" of the function(s) to be used,
appropriately.



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top