eval function

G

Guest

I recently posted a question about converting an Excel s.s. to Access. I
have a form that calculates part price using unbound fields of various
functions applied to a part's components. I thought I would be able to avoid
making this large number of fields part of the query to determine price by
keeping them unbound form fields and simply storing the final price in the
part dimension table. But now I have two problems - one, if I keep this
scenario I don't know how to recalculate all part prices (a batch update)
when component costs change since not all fields are part of the query, or
two, if I resort to putting all fields in the query (which would make it VERY
large) I don't know how to replace the unbound field on my form that calls
the eval function. Specifically, each model has a different formula for
calculating a certain dimension-e.g., model 3302 uses "[LENGTH]+(2*[ENDS
THICKNESS])+(2*[END_CLEATS THICKNESS])" to get OD_Length, whereas 3350 uses
"[LENGTH]+(2*[ENDS THICKNESS])+(2*[RUNNER STRIPS THICKNESS])"- so I have
those formulas as data in the field OD_Length Formula field and on the form
use eval(eval([OD_Length Formula]) to get that dimension. Putting it into a
query gives me #Error. Help please?!
 
M

Michel Walsh

Hi,


eval works in a "space" where the fields name mean nothing. So the
expression find a lot of undefined entities.


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

Similar Threads


Top