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

Canned formulas for users to select from combobox

Status
Not open for further replies.

jkirkland

Technical User
Apr 24, 2003
61
US
I have a table with canned formulas such as: (FldA + FldB)/FldB

I want the user to be able to select one of these from a combobox and then have this become a formula in my master query.

Unfortunately, I can only get the query to display (FldA + FldB)/FldB instead of this formula's result which should be a number.

My SQL shows: forms!myform!mytextbox as ColA

Any recommendations on how to make the query take the string from the text box and recognize it as a formula?

Let me know if I didn't provide enough details
Thanks!
 
Something very similar was discussed a week or so ago - I can't remember which forum or which thread, but I'm 99% certain it was Access.
 
I gave the eval() function a try, as mentioned in the thread you suggested, but I end up with the same result of the query reading "(FldA + FldB)/FldB" instead of the result of that formula.

My eval() statement was:
Eval("forms!myform!mytextbox") as ColA

mytextbox on myform has a value of: (FldA + FldB)/FldB

Any additional help is appreciated.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top