Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to click on a datasheet subform 1

Status
Not open for further replies.

projecttoday

Programmer
Feb 28, 2004
208
US
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?
 
How are ya projecttoday . . .

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] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top