Update 1 field by clicking on any field.

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

Guest

Here's what I need to do... In a form view, I want to be able to click in any
field in a row and automatically set the value of another field (not
displayed on the form) to "-1" (field in question is defined as Yes/No). How?
Thanks in advance.
Helmut
 
I would add a control to the form
Set its visible property to No
and bind it to the Yes/No field

Then I would add a button to the form and size it to the form's detail event
so it lays over the top of all the other controls. It the buttons click
event set the control's value to true.

Alternative would be to use code for every control on the form that sets the
yes/no field to true when the control gets clicked.. That could be as
simple as writing a function for the form like

Private Function fSetToTrue()
Me.YesNoControl = True
End if

Then select all the controls that you want to respond to a click and set the
click event to

ON CLICK: = fSetToTrue()

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top