Why? You can simply test for field 1 in your queries reports and forms.
This is like storing a calculated value in your table. It is normally not
done.
What is "field1" What is "field2"? What if you change a record (through a
query) and set field1 to "100", your field 2 would not get updated by that
query.
On the after update event of field1 write the code
If Me.Field1 = "100" then
me.Field2 = "2"
End if
But if it's a field that the user never change, write in the contril source
of the field2
=IIf([Field1] = "100",2,0)
Don't store this value in the table
On the after update event of field1 write the code
If Me.Field1 = "100" Or Me.Field1 = "200" Or Me.Field1 = "300" then
me.Field2 = "2"
Else
me.Field2 = "3"
End if
But if it's a field that the user never change, write in the contril source
of the field2
=IIf([Field1] In ("100","200","300"),2,3)
Don't store this value in the table
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.