Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

100%

Status
Not open for further replies.

kutibo

MIS
Dec 19, 2000
22
US
How can I force percentages to add up to 100% in '97?
Example:
Qty. Total Qty. Percent
100 300 33.33%
100 300 33.33%
100 300 33.34%

Thanks
 
Well... I do not think Access97 has a feature to perform this request. You would need to write some code to loop through the table then update the last value for a set accordingly.

However, If this is a report... You could potentially create a variable that tracks the current percentage and then add the necessary off-set to the last record. Could be a little complex, but possible.

htwh, Steve Medvid
"IT Consultant & Web Master"
 
For "SIMPLE" problems (e.g. your illustration) just round the sum.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
I don't beleive round() will work given the example layout of having x rows. You need to track the previous values and round the last value accordingly to insure 100%. That is given I understand the question presented.

Also, I noticed that this same question was posted by the same user in other sections. So, perhaps that post thread may have some other insights. Personally, I do not post the same question in multiple threads. Just a suggestion! Steve Medvid
"IT Consultant & Web Master"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top