Automatically a checkbox based on another field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Field1 is a check box. Field2 is related, optional info.

Normal flow is when a user "checks" Field1, then enters optional info in
Field2.

However, the user could enter optional info in Field2 w/o checking Field 1.
What's the best way to automatically have Access "check" Field1?

Thanks!
 
In Field2's AfterUpdate event, put code along the lines of:

Me.Field1 = (Len(Me.Field2) > 0)

In actual fact, even the following will work:

Me.Field1 = Len(Me.Field2)

since VBA treats 0 as False, and non-0 as True.
 
Back
Top