Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / August 2005

Tip: Looking for answers? Try searching our database.

Using SQL to retrieve a formula?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pruetta - 24 Aug 2005 15:46 GMT
I am wondering if there is a way in VBA to extract and use a formula that is
stored in an access table.  I have tried and the formula comes in as a string
and it will not work properly.  Is there a specific command in VBA that will
allow you to SQL the formula and have it work properly inside of you code?

Thanks,
Signature

pruetta

Klatuu - 24 Aug 2005 16:07 GMT
The EVAL function will do that.
strFormula = "((5 * 3)/3) + 100"
Foo = Eval(strFormula)

> I am wondering if there is a way in VBA to extract and use a formula that is
> stored in an access table.  I have tried and the formula comes in as a string
> and it will not work properly.  Is there a specific command in VBA that will
> allow you to SQL the formula and have it work properly inside of you code?
>
> Thanks,
pruetta - 24 Aug 2005 17:11 GMT
Klatuu,

Thanks.  I should have given an example with the formula I am wanting to
retrieve from Access.

Ex. "A + B - 180"

Where A & B are variable that have been set earlier in the code.

Thanks,

pruetta
Signature

pruetta

> The EVAL function will do that.
> strFormula = "((5 * 3)/3) + 100"
[quoted text clipped - 6 lines]
> >
> > Thanks,
Klatuu - 24 Aug 2005 17:25 GMT
You can reference control values in a form or report, but not variables, sorry.

> Klatuu,
>
[quoted text clipped - 19 lines]
> > >
> > > Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.