February 19, 2009
Use a form to display a list of reports and queries in an Access database
- Date: December 9th, 2008
- Author: Mary Ann Richardson
When you need to know what objects are being created for a database, you can run generic soft tabs cialis a query against an Access system table to generate a list of all current reports and queries.
Ever wonder exactly what reports and queries are being created for a database? As an administrator, you may need a quick way of determining what reports and queries are being run against a database. Fortunately, Access stores the names of all the top-level database objects in a system table called MSysObjects. You can run queries against MSysObjects just as you would any other table in the database. Follow these steps:
- Open the database and create a form with two unbound list boxes, as shown in Figure A.
Figure A
-
In Design view, right-click the first list box and select Properties.
-
Under the Data tab, right-click the RowSource property box and select Zoom.
-
Enter the code as shown in Figure B and click Close.
Figure B
-
Right-click the second list box and select Properties.
-
Under the Data tab, right-click the RowSource property box and select Zoom.
-
Enter the code as shown in Figure C.
Figure C
When you run the form, Access outputs all current reports and queries for that database to the respective list boxes (Figure D).
Figure D
To access other object types, use their type value. For example, to list all the tables in the database, enter 6. To list forms, enter -32768. To list macros, enter -32766.
Leave a comment
You must be logged in to post a comment.