PC Review


Reply
Thread Tools Rate Thread

How can I export a list of database objects?

 
 
=?Utf-8?B?U2FtIFdpbHNvbg==?=
Guest
Posts: n/a
 
      30th Jan 2006
I want to export a list of tables, a list of queries and a list of reports so
I can audit my database.
 
Reply With Quote
 
 
 
 
Brendan Reynolds
Guest
Posts: n/a
 
      30th Jan 2006
You didn't mention the format in which you wish to export. The following
example exports to a CSV (Comma-Separated Values) file, which can be
imported into many applications, for example you could import it into
another Access database or you can open it in Excel.

--
Brendan Reynolds
Access MVP

"Sam Wilson" <Sam (E-Mail Removed)> wrote in message
news:89AC5BB0-0A14-4B47-B93D-(E-Mail Removed)...
>I want to export a list of tables, a list of queries and a list of reports
>so
> I can audit my database.



 
Reply With Quote
 
Brendan Reynolds
Guest
Posts: n/a
 
      30th Jan 2006

It would probably help if I posted the example! :-)

Public Sub ExportCSV()

Dim strFile As String
Dim intFile As Integer
Dim aob As AccessObject

strFile = CurrentProject.Path & "\ObjectList.csv"
intFile = FreeFile

'This will overwrite any file with same
'name in same location - use with care.
Open strFile For Output As intFile
Write #intFile, "ObjectType", "ObjectName"
For Each aob In CurrentData.AllTables
If Left$(aob.Name, 4) <> "MSys" Then
Write #intFile, "Table", aob.Name
End If
Next aob
For Each aob In CurrentData.AllQueries
Write #intFile, "Query", aob.Name
Next aob
For Each aob In CurrentProject.AllReports
Write #intFile, "Report", aob.Name
Next aob
Close #intFile

End Sub

--
Brendan Reynolds
Access MVP

"Brendan Reynolds" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You didn't mention the format in which you wish to export. The following
> example exports to a CSV (Comma-Separated Values) file, which can be
> imported into many applications, for example you could import it into
> another Access database or you can open it in Excel.
>
> --
> Brendan Reynolds
> Access MVP
>
> "Sam Wilson" <Sam (E-Mail Removed)> wrote in message
> news:89AC5BB0-0A14-4B47-B93D-(E-Mail Removed)...
>>I want to export a list of tables, a list of queries and a list of reports
>>so
>> I can audit my database.

>
>



 
Reply With Quote
 
=?Utf-8?B?U2FtIFdpbHNvbg==?=
Guest
Posts: n/a
 
      30th Jan 2006
CSV is fine - where's the example?

Thanks

"Brendan Reynolds" wrote:

> You didn't mention the format in which you wish to export. The following
> example exports to a CSV (Comma-Separated Values) file, which can be
> imported into many applications, for example you could import it into
> another Access database or you can open it in Excel.
>
> --
> Brendan Reynolds
> Access MVP
>
> "Sam Wilson" <Sam (E-Mail Removed)> wrote in message
> news:89AC5BB0-0A14-4B47-B93D-(E-Mail Removed)...
> >I want to export a list of tables, a list of queries and a list of reports
> >so
> > I can audit my database.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      30th Jan 2006
SELECT
IIf(MSysObjects.Type=1,'TABLE',IIf(MSysObjects.Type=5,'QUERY',IIf(MSysObjects.Type=5,'QUERY',IIf(MSysObjects.Type=-32768,'FORM',IIf(MSysObjects.Type=-32764,'REPORT',IIf(MSysObjects.Type=-32766,'MACRO',IIf(MSysObjects.Type=-32761,'MODULE',IIf(MSysObjects.Type=-32756,'PAGE',IIf(MSysObjects.Type=8,'RELATIONSHIPS',IIf(MSysObjects.Type=6,'TABLE
LINKED','Unknown')))))))))) AS ObjectName, MSysObjects.Name,
MSysObjects.Type, MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "~*" And (MSysObjects.Name) Not Like
"Msys*") AND ((MSysObjects.Type) Not In (2,3)))
ORDER BY
IIf(MSysObjects.Type=1,'TABLE',IIf(MSysObjects.Type=5,'QUERY',IIf(MSysObjects.Type=5,'QUERY',IIf(MSysObjects.Type=-32768,'FORM',IIf(MSysObjects.Type=-32764,'REPORT',IIf(MSysObjects.Type=-32766,'MACRO',IIf(MSysObjects.Type=-32761,'MODULE',IIf(MSysObjects.Type=-32756,'PAGE',IIf(MSysObjects.Type=8,'RELATIONSHIPS',IIf(MSysObjects.Type=6,'TABLE LINKED','Unknown')))))))))), MSysObjects.Name;
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Sam Wilson" wrote:

> I want to export a list of tables, a list of queries and a list of reports so
> I can audit my database.

 
Reply With Quote
 
Brendan Reynolds
Guest
Posts: n/a
 
      30th Jan 2006
I posted it later, Sam - do you see it now?

--
Brendan Reynolds
Access MVP

"Sam Wilson" <(E-Mail Removed)> wrote in message
news:EBF71C5B-6575-4E83-9FE0-(E-Mail Removed)...
> CSV is fine - where's the example?
>
> Thanks
>
> "Brendan Reynolds" wrote:
>
>> You didn't mention the format in which you wish to export. The following
>> example exports to a CSV (Comma-Separated Values) file, which can be
>> imported into many applications, for example you could import it into
>> another Access database or you can open it in Excel.
>>
>> --
>> Brendan Reynolds
>> Access MVP
>>
>> "Sam Wilson" <Sam (E-Mail Removed)> wrote in message
>> news:89AC5BB0-0A14-4B47-B93D-(E-Mail Removed)...
>> >I want to export a list of tables, a list of queries and a list of
>> >reports
>> >so
>> > I can audit my database.

>>
>>
>>



 
Reply With Quote
 
Albert D.Kallal
Guest
Posts: n/a
 
      30th Jan 2006
you can use the built in documenter.

Try tools->analyze->documenter.

The above is designed to printout everything you have in your database. It
will even printout code if you want...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.members.shaw.ca/AlbertKallal


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export the database objects Frank Situmorang Microsoft Access Database Table Design 2 7th May 2008 04:06 PM
List objects in linked database =?Utf-8?B?QnJ1Y2VT?= Microsoft Access VBA Modules 1 11th Feb 2007 08:42 PM
Export or Import Objects from One Secured Database to Another Don Microsoft Access Security 5 22nd Oct 2005 03:10 PM
Export or Import Objects from One Secured Database to Another Don Microsoft Access External Data 5 22nd Oct 2005 03:10 PM
Printing (or export to file) a list of objects jjones Microsoft Access 1 25th Mar 2004 11:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:12 PM.