Is there a way to determine what control I clicked using a global click event. I would like to be able to click a form text box table I created for my access app to enable to enable and unlock it without have a million on click event handlers
Talguy
0
Junior Poster in Training
Recommended Answers
Jump to PostHi Talguy,
I hope you can explain your second sentence. Most helpers will have trouble understanding that sentence.
Thanks
Jump to PostIn a module add the following -
Public Sub UnlockTextBoxes(frm As Form) 'frm is the Form you are referring to... Dim Control As Control For Each Control In frm.Controls If TypeOf Control Is TextBox Then If Control.Name = "MyTextBox" Then Control.Locked = False End If End If …
Jump to PostUse an array of controls as in txtDay1(0) to say txtDay1(5) etc. With the above at the 'If Control.Name' you can use 'If Control.Index >0 And Control.Index <6' unlock the textboxes, assuming that you know which day of the week represents which Index number.
This will be about the …
All 11 Replies
kinwang2009
7
Posting Whiz in Training
AndreRet
526
Senior Poster
Talguy
0
Junior Poster in Training
AndreRet
526
Senior Poster
Talguy
0
Junior Poster in Training
AndreRet
526
Senior Poster
Talguy
0
Junior Poster in Training
AndreRet
526
Senior Poster
Talguy
0
Junior Poster in Training
Talguy
0
Junior Poster in Training
AndreRet
526
Senior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.