Steve
Not too tough.
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType? = acTextBox Then
Debug.Print ctl.Name
End If
Next ctl
Regards,
Bill Mosca,
Founder, MS_Access_Professionals
MS Access MVP 2006-2016
That'll do IT http://thatlldoit.com
My Nothing-to-do-with-Access blog
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Friday, May 04, 2018 6:35 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] How do I select text boxes from the controls collection?
In the snippet of code below, what can I do to debug.print just the text
box controls? The form has labels and other controls as well as text
boxes. What is the "something?" and "something else?" that will make the
If statement work?
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.something? = something else? Then
Debug.Print ctl.Name
End If
Next ctl
Thanks.
Steve
Posted by: "Bill Mosca" <wrmosca@comcast.net>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar