In one of my application doesn't work this statement. In the other I have no problem at all. It gives the error "Sub or function not defined". 
Code:
LocationNewApplication = DLookup("VersionNewAppLocation", "tblVersieProgramma") & "\" & CurrentProject.Name
Set db = OpenDatabase(VersionNewAppLocation, True)
Set rs = db.OpenRecordset("tblVersieLokaal")