Assign Values to Fields

  • Thread starter Thread starter Jonas M via AccessMonster.com
  • Start date Start date
J

Jonas M via AccessMonster.com

Is there anyway for me to assign a value to a field that is a "yes or no"
data type? What i have are 21 fields but of the 21 fields, I want 6 to have
a value of 10 for each yes; 6 to have a value of 4 for each yes; and 9 to
have a value of 2 for each yes. Then I want to be able to take the sum of
all fields and do all of this in a query. Any help is greatly appreciated.

TIA
 
Yes/No data is stored a either a zero or minus one. Use Iif in your query.

FieldDisplayLabel1: Iif([YourField1] = -1, 10, 0)

FieldDisplayLabel11: Iif([YourField11] = -1, 6, 0)

These can then be summed.
 
Thanks Karl! Have a great day!

KARL said:
Yes/No data is stored a either a zero or minus one. Use Iif in your query.

FieldDisplayLabel1: Iif([YourField1] = -1, 10, 0)

FieldDisplayLabel11: Iif([YourField11] = -1, 6, 0)

These can then be summed.
Is there anyway for me to assign a value to a field that is a "yes or no"
data type? What i have are 21 fields but of the 21 fields, I want 6 to have
[quoted text clipped - 3 lines]
 
Back
Top