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!

How Can I Determine if File is Compiled

Status
Not open for further replies.

PWise

Programmer
Dec 12, 2002
2,633
US
I would like to find a way to determine if an Access filed is compiled or not?
I have code this that run on startup

Code:
Function SetBypassKeyFalse()
Dim BoolAllow As Boolean
If right (CurrentProject.FullName,3)= "adp" Then
BoolAllow = False
Else
BoolAllow = True
End If
CurrentDb.Properties("AllowBypassKey") = BoolAllow
CurrentDb.Properties("AllowFullMenus") = BoolAllow
'CurrentDb.Properties("AllowShortcutMenus") = BoolAllow
CurrentDb.Properties("AllowBuiltInToolbars") = BoolAllow
CurrentDb.Properties("AllowToolbarChanges") = BoolAllow
CurrentDb.Properties("AllowSpecialKeys") = BoolAllow
CurrentDb.Properties("AllowBreakIntoCode") = BoolAllow
CurrentDb.Properties("StartupShowDBWindow") = BoolAllow
End Function

I don't the mean value that is returned by Application.IsCompiled. I mean whether the file is a .adp type or .ade type. I used to use the CurrentProject.FullName Property till someone showed me that if change the file extension the project still works correctly

Any ideas
 
found the answere Application.VBE.ActiveVBProject.Protection = 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top