[AccessD] Math equations

Salakhetdinov Shamil mcp2004 at mail.ru
Thu Mar 21 11:15:41 CDT 2013


 Hi Jim --

Thank you.

That was just about a month of Software Design Patterns and VB.NET 2003 "home research project" in October-November 2006.
I was a kind of "excited' about GoF ( http://en.wikipedia.org/wiki/Design_Patterns ) and related concepts that time and so I decided to "test them in practice".
The diagrams and all the other web stuff is generated from the VB.NET project code by using Enterprise Architect ( http://www.sparxsystems.com/ ).

BTW,  the best web site on Software Design Patterns I know about is located here:   http://www.dofactory.com/Default.aspx

-- Shamil


Четверг, 21 марта 2013, 8:15 -07:00 от "Jim Lawrence" <accessd at shaw.ca>:
>Hi Shamil:
>
>That is incredible! How long did you take to build and populate that series
>of pages? (from 2006 to now?) Magnificent job.
>
>Jim
>
>-----Original Message-----
>From:  accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Salakhetdinov
>Shamil
>Sent: Thursday, March 21, 2013 1:22 AM
>To: Access Developers discussion and problem solving
>Subject: Re: [AccessD] Math equations
>
> Hi John --
>
>Quick hint: eval(...) and maybe also 'Strategy Pattern' (
>http://smsconsulting.spb.ru/shamil_s/patterns/calc/index.htm ) - google for
>the more details of the latter....
>
>Thank you.
>
>-- Shamil
>
>
>Среда, 20 марта 2013, 23:16 -04:00 от John W Colby < jwcolby at gmail.com >:
>>Does anyone know a way to implement "dynamic" math equations in Access?  I
>am implementing a system 
>>for building up strings of verbiage for mail merge letters.  The verbiage
>is dependent on the 
>>insurer of a loan and the state that the loan is in.  For example it might
>say something like
>>
>>"Please Bid $X."  X is the result of an equation that may be something like
>>
>>X = the greater of FMV or MakeWhole but X must be at least 2/3 TotalDebt.
>>
>>Or it may say something like X = Y% * FMV or TotalDebt whichever is less,
>where Y% comes from the 
>>insurer table, i.e. Y is 80% for insurer A, 90% for insurerB and 100a% for
>InsurerC.
>>
>>The equations can depend on the state but also a % figure taken from the
>insurer.
>>
>>There are 51 states and 5 insurers so there are a ton of possible
>combinations / equations.  All of 
>>which comes from a spreradsheet of text "descriptions" for each insurer for
>each state which I am 
>>supposed to somehow compute.
>>
>>The old system just used a slew of hard coded equations in huge iif()
>statements, embedded directly 
>>in fields in queries.
>>
>>ICK!
>>
>>I would prefer to somehow map this to a small(er)  set of equations with
>values fed in from the 
>>state and insurer tables.  The verbiage strings would be stored in the
>state table, possibly a 
>>state/insurer table. where the verbiage is in the table with replaceable
>symbols in the string.  I 
>>could pull the string out of the table, look for X and run a math function
>to figure out X and 
>>substitute the literal X (or other "replaceable character" ) with some
>dollar amount.
>>
>>And finally I would like to avoid VBA code if possible.  The intent is to
>eventually move these out 
>>of Access so if the solution mapped easily into C# that would be good.
>>
>>I have never really seen anything like this implemented (table driven) and
>I am drawing a blank on 
>>how to go about it, particularly without resorting to custom VBA functions.
>In the end VBA 
>>functions are preferable to IIF() statements in custom Access queries.  I
>could at least "port" VBA 
>>to C# later.
>>
>>-- 
>>John W. Colby
>>
>>Reality is what refuses to go away
>>when you do not believe in it
>>


More information about the AccessD mailing list