[AccessD] Math Problem

William Hindman wdhindman at bellsouth.net
Tue Oct 14 18:07:33 CDT 2003


...I can see something like that working for a two record compare but you
lose me when you start looking at several records that could together sum to
zero?

William Hindman
"The future will not belong to those who are cynical or
those who stand on the sidelines. The future will belong to those who
have passion and are willing to work hard to make our country better."
...Paul Wellstone "The Conscience of a Liberal"


----- Original Message ----- 
From: "Drew Wutka" <DWUTKA at marlow.com>
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>
Sent: Tuesday, October 14, 2003 6:50 PM
Subject: RE: [AccessD] Math Problem


> What I was going to suggest, was to create an SQL string with a Join
between
> the same table over and over (for each number of records), then let JET
> create the combinations for you.  The last field would be a sum of the
other
> fields, so you would just need to add a criteria where the sum equals 0.
>
> Drew
>
> -----Original Message-----
> From: Mitsules, Mark [mailto:Mark.Mitsules at ngc.com]
> Sent: Tuesday, October 14, 2003 5:21 PM
> To: 'Access Developers discussion and problem solving'
> Subject: RE: [AccessD] Math Problem
>
>
> I am waiting in anticipation for even a suggestion of how one would
> accomplish this.  I am not a math or coding genius by any stretch, but a
> little refresher research on combinations confirmed that coding a solution
> would be over my head.  The first stumbling block is allowing for any
> possible combination of records up to and including the max number of
> records in the recordset.  The second is tracking each "hit" without
> repeating that combination later on in a different order.  I'm usually a
> "glass is half full" kind of guy...but "yikes".
>
>
> Mark
>
>
>
> -----Original Message-----
> From: Lonnie Johnson [mailto:prodevmg at yahoo.com]
> Sent: Tuesday, October 14, 2003 1:31 PM
> To: 'MS-ACCESS-L at lists.missouri.edu'; AccessDevelopers; AccessD solving'
> Subject: [AccessD] Math Problem
>
>
> This is one for the math guys who code. I have a situation where I need to
> take a field in a group of records and see if any combination of the
values
> in the field equal zero.
>
> Example:
>
> MyField
>    5
>   -2
>    7
>   -3
>    6
>
> This group of records would have a combination that equals zero
(5, -2, -3).
> I hope someone has something.
>
>
>
> Lonnie Johnson
> ProDev, Professional Development of MS Access Databases
> Visit me at ==> http://www.prodev.us
>
>
>
>
>
>
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list