I have a datasheet subform on a form. When the user clicks on one of the cells on the datasheet, how do I or what event do I use to trap the click and determine which cell has been clicked?
Each cell/textbox has its own [blue]Click[/blue] event. If your performing something common to each, call a common routine or function ... passing the textbox name to it. Example:
Code:
[blue]Private Sub [purple][b]TextboxName1[/b][/purple]_Click()
Call PrintName("TextboxName1")
End Sub
Private Sub [purple][b]TextboxName2[/b][/purple]_Click()
Call PrintName("TextboxName2")
End Sub
Public Sub PrintName(Nam As String)
Debug.Print Nam
End Sub[/blue]
[blue]Your Thoughts? . . .[/blue]
See Ya! . . . . . .
Be sure to see thread181-473997 [blue]Worthy Reading![/blue]
Also faq181-2886 [blue]Worthy Reading![/blue]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.