I really hope there is an easy add-in or something that will do this….is there an easy way to get a list of all objects on a form?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
List all objects on a form? (XP)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » List all objects on a form? (XP)
- This topic has 8 replies, 4 voices, and was last updated 19 years, 12 months ago.
AuthorTopicWSNYIntensity
AskWoody LoungerJune 9, 2005 at 6:33 pm #420546Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerJune 9, 2005 at 6:50 pm #952583Depends on where you want the list to end up. You can do something like this:
Sub ListControls()
Dim frm As Form
Dim ctl As Control
DoCmd.OpenForm “frmMyForm”, acDesign
Set frm = Forms!frmMyForm
For Each ctl In frm.Controls
Debug.Print ctl.Name
Next ctl
DoCmd.Close acForm, “frmMyForm”
Set ctl = Nothing
Set frm = Nothing
End SubThis will list all controls in the Immediate window.
-
WSteachesms
AskWoody LoungerJune 9, 2005 at 6:56 pm #952587(Edited by HansV to make URL clickable – see Help 19)
Am I off base here on this one, looking at this explanation, am not sure it is going to list your form objects one by one…or all objects by name in your database…
http://support.microsoft.com/?kbid=210347%5B/url%5D -
WSHansV
AskWoody Lounger -
WSteachesms
AskWoody LoungerJune 9, 2005 at 6:59 pm #952590Many thank yous…was being a bit lazy wasn’t I?
-
-
WSNYIntensity
AskWoody Lounger -
WSHansV
AskWoody LoungerJune 9, 2005 at 7:37 pm #952603Try this:
Sub ListControls()
Dim frm As Form
Dim ctl As Control
Dim strForm As String
Dim f As Integer
strForm = InputBox(“Enter name of form”)
If strForm = “” Then Exit Sub
f = FreeFile
Open “C:List.txt” For Output As #f
DoCmd.OpenForm strForm, acDesign
Set frm = Forms(strForm)
For Each ctl In frm.Controls
Print #f, ctl.Name
Next ctl
DoCmd.Close acForm, strForm
Close #f
Set ctl = Nothing
Set frm = Nothing
End SubReplace C:List.txt with the path and name you prefer.
-
WSNYIntensity
AskWoody Lounger
-
-
WSFrancois
AskWoody LoungerJune 9, 2005 at 7:38 pm #952602Modify Hans’ code to :
Sub ListControls()
Dim frm As Form
Dim ctl As Control
DoCmd.OpenForm “frmMyForm”, acDesign
Set frm = Forms!frmMyForm
Open “c:testfile.txt” For Output As 1
For Each ctl In frm.Controls
Write #1, ctl.Name
Next ctl
Close #1
DoCmd.Close acForm, “frmMyForm”
Set ctl = Nothing
Set frm = Nothing
End SubThis will create a file named testfile in the root directory of your c drive. You can open it with Notepad
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
2 seconds ago -
KB5061768 update for Intel vPro processor
by
drmark
3 hours, 5 minutes ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
34 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
15 hours, 8 minutes ago -
Office gets current release
by
Susan Bradley
19 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
1 day, 12 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
20 hours, 54 minutes ago -
Stop the OneDrive defaults
by
CWBillow
1 day, 13 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
1 day, 23 hours ago -
X Suspends Encrypted DMs
by
Alex5723
2 days, 1 hour ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
2 days, 1 hour ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
2 days, 2 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
2 days, 2 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
1 day, 15 hours ago -
Enabling Secureboot
by
ITguy
1 day, 22 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
2 days, 10 hours ago -
No more rounded corners??
by
CWBillow
2 days, 6 hours ago -
Android 15 and IPV6
by
Win7and10
1 day, 20 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
2 days, 23 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
3 days, 1 hour ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
2 days, 20 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
3 days, 9 hours ago -
May preview updates
by
Susan Bradley
2 days, 20 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
2 days, 12 hours ago -
Just got this pop-up page while browsing
by
Alex5723
3 days, 1 hour ago -
KB5058379 / KB 5061768 Failures
by
crown
2 days, 22 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
2 days ago -
At last – installation of 24H2
by
Botswana12
4 days ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
22 hours, 23 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
4 days, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.