View Full Version : Scan Database


H2os
11-12-2007, 03:45 PM
:confused:How can I scan my databases for any declare statments and out put it to an text file.

Output this information->: Private Declare Function apiGetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

I would like to make a list of all the DLL files in my database.

The_Doc_Man
11-12-2007, 09:28 PM
Modules exist as a collection in two places. You can scan modules once you locate them. They are line-numbered string sequences.

The first place is the database's Modules collection. Each general module is there by name and each line is stored in text UNLESS someone has converted it to an MDE in which the source has been removed once it was compiled.

The second place is the database's Documents collection, which stores the Forms and Reports even when they aren't open. Forms collection and Reports collection can be scanned as well, but the form or report must be OPEN at the time to be a member of the Forms or Reports collection. You can Open the form or report document to instantiate it, at which time the Forms("myformname").Module becomes accessible just like a general module. Again, it is a line-numbered list of strings.

Once you have the strings, you can search them for the stuff you wanted to see, I think.