???? Dev Hashish ????
I think my Spell Check must have clobbered that :~)
*** this Dev Ashish code ***
Glad he could help :~)
(david)
"Arno R" <ar***********@ tiscali.nl> wrote in message
news:43******** ************@dr eader2.news.tis cali.nl...
"david epsom dot com dot au" <david@epsomdot comdotau> schreef in bericht
news:43******** *************** @lon-reader.news.tel stra.net...
SysCmd 504, 16483 ' - Save And Compile
or try this Dev Hashish code:
'********** Code start **********
Function fCompileProject () As Boolean
Dim db As Database
Dim ctr As Container
If Not Application.IsC ompiled Then
Set db = CurrentDb
Set ctr = db.Containers!M odules
If ctr.Documents.C ount > 0 Then
DoCmd.OpenModul e ctr.Documents(0 ).Name
Else
'No Modules present, try Forms container
Set ctr = db.Containers!F orms
'no need to check for count since this code
'itself must be present *somewhere*
DoCmd.OpenForm ctr.Documents(0 ).Name
End If
DoCmd.RunComman d acCmdCompileAnd SaveAllModules
DoCmd.Close acModule, ctr.Documents(0 ).Name
End If
fCompileProject = Application.IsC ompiled
End Function
'*********** Code End **********
I've never noticed any difference between compiled and uncompiled code.
(david)
"Arno R" <ar***********@ tiscali.nl> wrote in message
news:43******** ************@dr eader2.news.tis cali.nl...
Hi all,
Is it possible to execute a command like 'CompileAndSave All' at runtime?
In a new app I use a codelibrary. (The app is still changing, codelib
also)
I add this lib to the references at startup with code.
By adding the lib the db enters a 'decompiled' state.
I would like to compile at runtime or is this not needed?
Btw: I also remove this lib with code when the app closes.
Any ideas?
Arno R
Thanks David,
I already had been trying the SysCmd 504, 16483 earlier.
Found that with a Google search.
I just though it was not working, because when I checked in a module the
option to Compile was/is still enabled ...
Same with the function, but the value of Application.IsC ompiled changes in
both occasions.
So I think the app *is* compiled when Application.IsC ompiled =True
Confusing this ...but thanks a lot.
Arno R