Suppose you want to determine whether any two forms represented in the repository share a name. You can create a Visual Basic project to display those names that are common to two or more forms. One way to accomplish this is to do it with query logic in a Visual Basic module.
To use queries against the repository database, your Visual Basic module should follow these steps:
Before you run this project, add a reference to the Microsoft Repository type library. You need this reference because the project calls Repository directly to open the repository. (Type library references are managed by Visual Basic through the References dialog box, accessible from the Project menu.)
For More Information Repository SQL Schema; MDO Model SQL Schema