Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

detect row/column click on continous subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CuriousMark - 11 May 2007 23:07 GMT
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
Marshall Barton - 12 May 2007 01:27 GMT
>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.

Signature

Marsh
MVP [MS Access]

CuriousMark - 13 May 2007 03:24 GMT
Thanks very much. I'll give it a try.

CM

> >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
[quoted text clipped - 12 lines]
> and the function can determine the clicked control by
> referring to Me.ActiveControl.
Ken Snell (MVP) - 12 May 2007 17:36 GMT
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".

Signature

       Ken Snell
<MS ACCESS MVP>

>I would like to write code that detects the row and column selected by a
>user
[quoted text clipped - 6 lines]
>
> CM
CuriousMark - 13 May 2007 03:23 GMT
Thanks. I'll give it a try. Sounds pretty simple.

CM

> 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".
[quoted text clipped - 9 lines]
> >
> > CM
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.