set field value based on other fields values

natali

I'm trying to create a validation rule in Access 2010 to set the value of a true/false field to True...

More details, I have a table with several yes/no fields and one true/false field and I want the true/false field to change to true only if all the yes/no fields are yes.

I'm trying to make it that it is set automatically after updating the fields and without the user changing it...

HansUp

A Validation Rule can not alter a field's value. It can only indicate whether or not that value should be considered valid.

If you want a field which automatically updates itself to indicate whether other fields are all True, consider a calculated field or a data macro. Since you're using Access 2010, both those options are supported.

However, a simpler approach would be to decide you don't need that summary field to exist in your table design. You could use a query to derive it whenever you need to see it.

For example, with two Yes/No fields Fld1 and Fld2, a simple field expression will tell you whether both are True ...

SELECT Fld1, Fld2, (Fld1=True AND Fld2=True) AS all_are_true

That would present True as -1 and False as 0. If you want the query to show those values as True or False, you can use a Format expression ...

SELECT Fld1, Fld2, Format((Fld1=True AND Fld2=True), 'True/False') AS all_are_true

That computation is a trivial workload for the db engine. And computing the field expression each time you run the query ensures all_are_true reflects the latest changes to the other fields.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

SQL Server - Case statement for one field based on content of other fields

From Dev

Model field based on other fields?

From Dev

Mongoose: Set subdocument field value based on parent field value on save

From Dev

Django calculate field based on two other fields in formset

From Dev

How to set django model field value based-on value of other field in the same Model

From Dev

Find a value in set of other values

From Dev

set field value based on other fields values

From Dev

Conditional validation of fields based on other field value in Symfony2

From Dev

Access 2013 - Set a field value based on value of another field

From Dev

Joomla Component Dynamic Custom Field based on other Field Value

From Dev

Query to fill in Null fields with maximum value based on other fields

From Dev

Display Form Field based on other Fields within the Django Form

From Dev

set values in dataframe based on columns in other dataframe

From Dev

Model - field based on values in other fields

From Dev

How to dynamically modify a form field based on 2 other fields in Symfony?

From Dev

Django calculate field based on two other fields in formset

From Dev

Want to update other column field values based on the new edited value on my grid rally

From Dev

How to fill in a field based on conditional subsetting from 2 other fields

From Dev

Set value to other input field

From Dev

Set Value for Field in complete Table if Value of other Field is met

From Dev

how to add 'required' attribute to input field based on other fields values

From Dev

how to set django model field value based on value of other field in the different model

From Dev

How to delete rows based on field value but not if certain other field values Dont exist

From Dev

MySQL select calculate 2 fields based on other field

From Dev

Getting sum of values in a field based on variables in other field

From Dev

mongodb count value of one field based on other

From Dev

How to null values based on an other field value

From Dev

Updating a field based on other fields being changed

From Dev

How to set the value of a model field by performing an equation between other model fields

Related Related

  1. 1

    SQL Server - Case statement for one field based on content of other fields

  2. 2

    Model field based on other fields?

  3. 3

    Mongoose: Set subdocument field value based on parent field value on save

  4. 4

    Django calculate field based on two other fields in formset

  5. 5

    How to set django model field value based-on value of other field in the same Model

  6. 6

    Find a value in set of other values

  7. 7

    set field value based on other fields values

  8. 8

    Conditional validation of fields based on other field value in Symfony2

  9. 9

    Access 2013 - Set a field value based on value of another field

  10. 10

    Joomla Component Dynamic Custom Field based on other Field Value

  11. 11

    Query to fill in Null fields with maximum value based on other fields

  12. 12

    Display Form Field based on other Fields within the Django Form

  13. 13

    set values in dataframe based on columns in other dataframe

  14. 14

    Model - field based on values in other fields

  15. 15

    How to dynamically modify a form field based on 2 other fields in Symfony?

  16. 16

    Django calculate field based on two other fields in formset

  17. 17

    Want to update other column field values based on the new edited value on my grid rally

  18. 18

    How to fill in a field based on conditional subsetting from 2 other fields

  19. 19

    Set value to other input field

  20. 20

    Set Value for Field in complete Table if Value of other Field is met

  21. 21

    how to add 'required' attribute to input field based on other fields values

  22. 22

    how to set django model field value based on value of other field in the different model

  23. 23

    How to delete rows based on field value but not if certain other field values Dont exist

  24. 24

    MySQL select calculate 2 fields based on other field

  25. 25

    Getting sum of values in a field based on variables in other field

  26. 26

    mongodb count value of one field based on other

  27. 27

    How to null values based on an other field value

  28. 28

    Updating a field based on other fields being changed

  29. 29

    How to set the value of a model field by performing an equation between other model fields

HotTag

Archive