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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Evaluate expression in Access

Status
Not open for further replies.

rf222

Programmer
Jan 29, 2004
94
US
I would like each record in MyFields.MyExpression filed to contain and expression, which would be calculated on the report at runtime. I am not sure how to do evaluate it at runtime.

Example:
1) First record
MyFields.MyExpression = "tblMain.Calc1*tblMain2.Calc2"

1) Second record
MyFields.MyExpression = "tblMain.Calc2*tblMain2.Calc3"

How would I display THE ACTUAL CALCULATED VALUE of MyFields.MyExpression on the report?

The idea is that the field MyExpression is calculated based on fields from other tables...

 
I am not quite sure what you want, because I do not think the example above would work anywhere, but perhaps you can look at setting the control source of a textbox from MyExpression or Eval may suit.
 
How about using
Switch Function or Nested IIF() ?

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
Have a look at the Eval function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top