Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Feidl updates 1

Status
Not open for further replies.
Nov 24, 2004
159
GB
Hi how do i, in ms access 2010 set one field to false when another field is set to true?
 

If OneField and AnotherField are declared as Boolean:

Code:
OneField = Not(AnotherField)

Have fun.

---- Andy
 
excuse my ignorance where would I do this.

I only want it do update the other field to false when i up the current feild.
 
Prior to 2010 you could do that only on a form normally in the afterupdate of the first control. However, if the values were changed in a table or query there was no way to trap that change. 2010 now has data macros at the tables level. Now with data macros you basically can trap a change in data at the table level. See here:

one question
if the first control changes to true you want the second to become false.
if the first control changes back to false then do you want to do nothing?

If so in the afterupdate of somefield
if me.somefield = true then me.someotherField = false
or if true becomes false and false becomes true like Andy shows
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top