counting field values

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Counting field values

Counting field values

resolvedResolved · Low Priority · Version 2003

Daiga has attended:
Access Intermediate course

Counting field values

I am trying to design my database and let's say I have 8 number fileds (each decimal double) to enter the number of vaccines administered to people in different age groups (8 categories) on my form. And I want to create settings that would allow user to enter only correct data - in this case the sum of those eight fileds should match and fit the total number, which is another number field with called ' total number of vaccines administered'. How to set it up? Is it something to do in table properties? Is it validation rule or is it expression builder where I do the settings? I am looking forward for your help.
Thanks in advance

RE: counting field values

Hi Daiga

Thanks for your question

Can you clarify for me how you want this to work?

Do you want the user to enter the 8 numbers, and after the final number is entered Access checks to see if the sum of the numbers matches a figure in the totals column?

If this is the case, then what do you want to happen if the numbers don't match?

Thanks

Stephen

RE: counting field values

Yes, there should be 8 number fileds on the form, but I would like to have another one - N/A (when data is not provided). If data are provided for only some age ranges, I should assume the rest are zero. N/A only to be used if no data provided at all (so should be left blank the field of totals aswell). Yes, I think that would be the best - that Access checks whether the totals column matches with sum after all fields antered. If they don't match I would like to have the message popping up that the sum of hose 8 fields should be equal to totals. Perhaps there is a way to set up each field that it is not greater than total field. .....

Counting field values

Yes, there should be 8 number fileds on the form, but I would like to have another one - N/A (when data is not provided). If data are provided for only some age ranges, I should assume the rest are zero. N/A only to be used if no data provided at all (so should be left blank the field of totals aswell). Yes, I think that would be the best - that Access checks whether the totals column matches with sum after all fields antered. If they don't match I would like to have the message popping up that the sum of hose 8 fields should be equal to totals. Perhaps there is a way to set up each field that it is not greater than total field. .....


 

Access tip:

Insert The Current Date

To insert the current date into a Table field or Form Text box use:

Ctrl+Semi-Colon(;)

View all Access hints and tips


Server loaded in 0.09 secs.