<SPAN id=hbblock><LABEL id=HbSession SessionId="2409384062"></LABEL>
<DIV>Thank you Gustav,</DIV>
<DIV> </DIV>
<DIV>The number of rows may vary with each client. This will be an accounting feature. There will be a client number and that's how I will group. A client could have one record or ten records. I was looking for something efficient and something that I could load a couple of variables which would be the number of records and an array of the values.</DIV>
<DIV> </DIV>
<DIV>Thanks again.<BR><BR><B><I>Gustav Brock <gustav@cactus.dk></I></B> wrote: </DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Lonnie<BR><BR>If you only have a few rows as shown I don't think you have any other<BR>possibility than trying the different combinations using some loops.<BR><BR>You could, of course, start by ruling out some of the impossible<BR>combinations by adding all the negatives and all the positives; here<BR>it will return -5 and +18 which shows that 7 can be ruled out as it is<BR>larger than the absolute value of the sum of negatives. On the other<BR>hand, -2 and -3 must be included in any combination as the absolute<BR>value of the sum of these equals the smallest positive number, 5.<BR><BR>If you have many rows you'll have to find some smarter routines as the<BR>number of combinations increase dramatically.<BR><BR>/gustav<BR><BR><BR>> 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.<BR><BR>> Example:<BR><BR>> MyField<BR>> 5<BR>> -2<BR>> 7<BR>> -3<BR>> 6<BR><BR>> This group of records would have a combination that equals zero (5, -2, -3). I hope someone has something. <BR><BR>_______________________________________________<BR>AccessD mailing list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website: http://www.databaseadvisors.com</BLOCKQUOTE></SPAN><BR><BR><DIV>
<DIV>
<P align=center><STRONG>Lonnie Johnson<BR></STRONG><STRONG>ProDev</STRONG>, Professional Development of MS Access Databases<BR>Visit me at ==> <A href="http://www.prodev.us/">http://www.prodev.us</A></P>
<P><BR><A href="http://www.galaxymall.com/software/PRODEV"><BR></A><BR> </P></DIV></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://shopping.yahoo.com/?__yltc=s%3A150000443%2Cd%3A22708228%2Cslk%3Atext%2Csec%3Amail">The New Yahoo! Shopping</a> - with improved product search