[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Printing a List of Acess Forms

Posted on 2014-04-22
3
Medium Priority
?
314 Views
Last Modified: 2014-04-22
Hi Experts,

Is there any quick way that I can print out a list of Access forms that are within a .accdb file?

I don't need anything fancy just a quick list.

Thank you,
0
Comment
Question by:APD_Toronto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 2000 total points
ID: 40016143
From the OnClick event procedure of a command button on a form:

Dim i As Integer
With CodeProject
For i = 0 To .AllForms.Count - 1
    Debug.Print .AllForms(i).Name
Next i
End With

Open in new window


The output will show up in the Immediate Window. Press Ctrl-G while editing Visual Basic code to see the Immediate Window.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40016149
test this

Sub ListForms()
Dim db As database
Dim d As Document
Dim C As Container
Set db = CurrentDb()
Set C = db.Containers("Forms")
For Each d In C.Documents
    Debug.Print d.Name
Next d
End Sub
0
 
LVL 39

Expert Comment

by:PatHartman
ID: 40016173
You can use a query which gives you some flexibility on how you use the output.

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Type)=-32768))
ORDER BY MSysObjects.Name;


If you can't see the MSys tables, you can show them by going to Navigation Options and checking the Show System Objects box.

Each object type has a unique type code.  The MSys tables are not documented but if you have a database with a variety of objects, you should be able to see most of the available types.  Here's a list from my explorations:
Type      TypeDesc
-32768      Form
-32766      Macro
-32764      Reports
-32761      Module
-32758      Users
-32757      Database Document
-32756      Data Access Pages
1      Table - Local Access Tables
2      Access Object - Database
3      Access Object - Containers
4      Table - Linked ODBC Tables
5      Queries
6      Table - Linked Access Tables
8      Relationships
9      Constraints
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question