[AccessD] Math Problem

Drew Wutka DWUTKA at marlow.com
Tue Oct 14 17:50:29 CDT 2003


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


More information about the AccessD mailing list