detect row/column click on continous subform

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

Guest

I would like to write code that detects the row and column selected by a user
on a continuous subform. I have a subform that displays in continuous form so
that it looks like a list box. If the user clicks on in item within the
subform, how can I tell which column in which record was selected?

Thanks in advance.

CM
 
CuriousMark said:
I would like to write code that detects the row and column selected by a user
on a continuous subform. I have a subform that displays in continuous form so
that it looks like a list box. If the user clicks on in item within the
subform, how can I tell which column in which record was selected?


The Click event of each control will be triggered so the
column is immediately identified.

The row is the current record so you can grab its pk value
or what ever you use to identify the record.

You don't even need a click event procedure for each
control. You can use a single function by setting all the
controls' OnClick property to =myfunction()
and the function can determine the clicked control by
referring to Me.ActiveControl.
 
Name of the control that has the focus will tell you the "column". Value of
primary key for the record that has the focus will tell you the "row".
 
Thanks very much. I'll give it a try.

CM

Marshall Barton said:
The Click event of each control will be triggered so the
column is immediately identified.

The row is the current record so you can grab its pk value
or what ever you use to identify the record.

You don't even need a click event procedure for each
control. You can use a single function by setting all the
controls' OnClick property to =myfunction()
and the function can determine the clicked control by
referring to Me.ActiveControl.
 
Back
Top