Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if a public module exists in the database

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I would like to check if the module "ProgUpdt" exists in the database. and if not import that module from a different database.

I know how to do it for Queries, but not for modules.

Code:
Dim AllQueries As QueryDef
Dim QueryName As String

    For Each AllQueries In CurrentDb.QueryDefs
        
        QueryName = AllQueries.Name
        If QueryName = "Import Query" Then
            DoCmd.DeleteObject acQuery, QueryName
        End If
    Next AllQueries
 
How about:
Code:
For Each mdl In CurrentProject.AllModules
Debug.Print mdl.Name
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top