Solved

Make a Check equal a percentage

Posted on 2012-12-23
8
443 Views
Last Modified: 2012-12-26
hello experts I dont know if this is possible but I have  fields thatare check  marks

 once the field is checked I need it to equal a certain percentage which then is then totaled the check fields can all add up to100%'

For example:

Induction (with a check mark) =10%
Defuel(with a check mark)=20%


then as they continue to total up showintg the % until they finally show up to 100%



So do i nee d to make a module and  show what each check represents as a %  then have a text box with the codes of the  namesof the check mark with the sum code to get the percentage?

Something like this:

induction =10%
Defuel= 20%

(this in a text box) =DSumt("*","tblMODHistory","['Induction','Defuel')")
bingo.accdb
0
Comment
Question by:gigifarrow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 38717762
See attached. Field was added to form control source. Formula used:
Percentages: Format(Abs(([tblTempleFuelcellOnly]![Induction]+[tblTempleFuelcellOnly]![Defuel]+[tblTempleFuelcellOnly]![Turret ull]+[tblTempleFuelcellOnly]![FuelCellRemoved]+[tblTempleFuelcellOnly]![BFCSProvision]+[tblTempleFuelcellOnly]![BFCSInstall]+[tblTempleFuelcellOnly]![TurretInstall]+[tblTempleFuelcellOnly]![DriversSeatSpacer]+[tblTempleFuelcellOnly]![GunnersSeatStop]+[tblTempleFuelcellOnly]![CEPRetrofit]+[tblTempleFuelcellOnly]![25MM HotBox]+[tblTempleFuelcellOnly]![E1GroundInsert]+[tblTempleFuelcellOnly]![AFESCEPSwitchGuard]+[tblTempleFuelcellOnly]![ReliefHoleExtinguisherGuard]+[tblTempleFuelcellOnly]![EERHandleMod]+[tblTempleFuelcellOnly]![QA/QC]+[tblTempleFuelcellOnly]![OutDuction])/17),"00.0%")

Open in new window

That field is control source for text box.

Flyster
bingo.accdb
0
 

Author Comment

by:gigifarrow
ID: 38717780
Thank you Flyster thanks for your help and your time

But I do have a couple of questions

1.How do I give each field a percentage value?
2. How did the field Percentages get on the form and I dont see it on the table?

You see every time the user checks one of the fields like defuel that is equal to 20% and then they may check Induction that equal 10% so the Total percentage of all the fields so far is 30%..

all these fields eventially add up to 100% once they have checked them all.

so where would I put this code would to put the value of each fields percentage?

How do I disquinquish which defuel i am talking about should i do it by production number?



or should  I just do a drop down with the percetage  value and then add them together

Which I did try but when i put .10 or .30 it defaults to zero on a lookup field
0
 

Author Comment

by:gigifarrow
ID: 38717782
Here is the excel spreadsheet that my boss want me to turn into   ACCESS May this will help you understand a littltle better
ExcelHelp.xlsx
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 22

Expert Comment

by:Flyster
ID: 38717786
When a checkbox is checked, it has a value of -1. That's why I used ABS (Absolute) in the formula, it changes the value to a positve number. There are 17 checkboxes which is why the sum of the boxes is divided by 17. If you want each box to have a different value, you can assign the value in that formula as follows:

Percentages: Format(Abs((([tblTempleFuelcellOnly]![Induction] *10)+([tblTempleFuelcellOnly]![Defuel]*20 + ........../100,"00.0%")

Just make sure the 17 values totals 100
0
 

Author Comment

by:gigifarrow
ID: 38717788
wow thanks You are very good! I wish i could get to your level I buy books but they only go so far and it seems they never have the answers im looking for  I will try this And again thanks for your expert help!!!!
0
 

Author Comment

by:gigifarrow
ID: 38717791
I dont see percentages on the table is that unbound?
0
 
LVL 22

Expert Comment

by:Flyster
ID: 38717799
Books will get you just so far. I have learned a ton by just reading these posts. Work the problem, even if an answer was already accepted. Think of a "what if" problem and then work on it until you find a solution. Once you find a solution, see if you can find a different one. I'm glad I could help you out!
0
 

Author Comment

by:gigifarrow
ID: 38721633
Flyster if your still out there. I know the percentages is a unbound code but where is the formula. I looked on the form maybe on current nothing. I looked on the propery sheet and I dont see it. I feel really dumb but I cant find the code.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question