[AccessD] Need help with Eval() function

Steve Capistrant scapistrant at symphonyinfo.com
Tue Sep 9 17:43:14 CDT 2003


Build a function that accepts all the variables you need for the
calculation, and have it return the calculated value.  Don't have it
reference fields on forms or reports.  Then it is flexible enough to be
called from anywhere as needed.  Only watch our for calling user-defined
functions from a query; it can be a big drain on performance and sometimes
may not work at all depending on how deeply you've got it buried.

Steve Capistrant
Symphony Information Services
scapistrant at symphonyinfo.com
Phone: 612-333-1311
www.symphonyinfo.com
212 3rd Ave N, Ste 404
Minneapolis, MN 55401


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mcgillivray,
Donald [ITS]
Sent: Tuesday, September 09, 2003 5:12 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Need help with Eval() function


Well, thanks for the input, Charlotte, but I already tried that to no
avail.

Since this appears to be a dead end, maybe you or somebody else has an
idea that will accomplish what I'm trying to do.

I have a table of material types that may be added to over time.  I want
the cost calculation to be dynamic, such that when a new material type
is added, the user can define the formula that will deliver its cost.  I
intended to build a wizard-type form that would guide the user through
the creation of the formula by allowing the selection of fields and
operators.  I wanted to store the formula string in the material types
table and use it to drive the cost calculation when called.  My main
objective is to avoid having to open up some custom function to insert
new rules if a material type is added that doesn't fit an existing cost
formula; I want this to be hands-off for me once I turn it over.

Am I dreaming? Or is there another smarter way to do this?

Don




More information about the AccessD mailing list