473,386 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

I have 5 fields that I need to equal 100%

5
I have a table that has 5 fields and I need the % in each field to add up to 100%

For example:

Field1: 15% Field2: 25% Field3: 35% Field4: 20% Field5: 5%

Is there any way to have a validation rule to ensure these fields equate 100% for each record and if possible automatically fill the 5th field with the remaining percentage?

I am an Access beginner so take it easy on me. :D
May 19 '14 #1
4 1426
zmbd
5,501 Expert Mod 4TB
Simplest is to create a calculated control on a form and have the value double checked during the before update event.
Are you entering the data as 0.05, 5, or 5% the formating may make a difference in how you check the data.
May 19 '14 #2
feeeee
5
I have my fields set to:
Data Type: Number
Field Size: Single
Format: Percent
Decimal Places: 0

When 5 is entered in the field it displays 5%

Can you elaborate on how to do a calculated control or is it a straightforward method I can just look up?
May 19 '14 #3
zmbd
5,501 Expert Mod 4TB
click on the link provided in my last post, it will take you to the
basics on creating a calculated control.

Exactly what I needed on the field properties.

When you make your control, you might have to use the CSNG() to make sure things are added as numbers; however, with bound controls that isn't required.

Let us know how you get along...

(^_^)
May 19 '14 #4
feeeee
5
The field that contains the percentages is a combo box look up field value list. Will I need to delete these combo boxes and make new ones (5 percentage fields total per main form record) with an expression for each combo box that pulls the other 4 values together to check against 100%?

bit of a newb, I know, trying!:)
Jun 17 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: qsweetbee | last post by:
I have a form(fAddUsers) in my database. It is continue form for data entry. Some fields are required fields. Some are optional fields. There is 1 particular filed(TokenExpirationDate)on the form...
1
by: jimfortune | last post by:
This idea is still in the process of formulation. I'm considering the idea of storing encrypted data in memo fields. Since the data is for internal use only I don't think the legal limits on...
1
by: ian.davies52 | last post by:
I'm having a problem running a query. I get the "too many fields" error message, but I only have 162 fields in the query and I thought the limit was 255. The problem query (Query1) is based on...
11
by: K.K. | last post by:
Suppose I have a class called Vehicle with many fields. Now I make a new class derived from Vehicle called Car. I'd like to make a method to copy the data from a Vehicle instance to a Car instance....
50
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
4
by: tara99 | last post by:
I have a table called Applications which had 4 Fields and they are: ApplicationID --- this is auto numeber and Primary Key -- can't be duplicated Application ApplicationOwner Responsible ...
18
by: zzpat | last post by:
I've come to the conclusion that float was never made for designing a page, but is there a good way to float three columns with the following characteristics? leftColumn 20% rightColumn 20%...
2
by: parnellsquare | last post by:
I am a software tester - the developers I am working with are telling me there is no way to allow users to enter text that includes punctuation marks like apostrophes, quate marks, semi-colons,...
8
by: Wingot | last post by:
Hey, I have a program I am trying to write using Visual C#, SQL Server 2005/2008, and Visual Studio 2008, and one part of it includes a Schema called Client. Inside this schema, three tables...
1
by: OnDVirg | last post by:
I have a table with 3 date fields that for any given record should all be populated with the same date (the fields mean 3 different things, just have the same date) Is there a function that allows...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.