Form Events not firing after compile

dclosure

Registered User.
Local time
Yesterday, 18:14
Joined
Aug 23, 2012
Messages
12
Using Access 2007 on pc with Windows 7 to edit Access application housed on a Windows server.
A splash screen that works fine in the .accdb file does not fire any of its events once the file is converted to .accde.
What would cause this?
Renders the splash useless since it needs to create several new class objects and load some settings on form load then open the application main form and close itself.
 
Sounds like your db isn't Trusted. You know about this feature?
 
The db is in a trusted directory.
Do I need to set a more specific trust?
 
Before we conclude that could be the case, does any other code apart from the splash screen fire?
Did you 'Package and Sign' the db? It's under Options.
 
Thanks for the quick replies!
No, no other code fires until the splash screen opens the the main form.
To test to see if anything was happening I commented out all code and put these two lines in each event: Open, Load, Activate, and Current (changing the text as appropriate for each)
Dim varReturn
varReturn = SysCmd(acSysCmdSetStatus, "Current")

That works fine in the uncompiled version but the compiled version only shows "Form View" on the status bar as if no event had fired.

Packaging and signing are new to me, so no, I haven't done that.

This is an existing application that has been working for a few years but needs some updates.
 
Package and Sign then before converting to accde.

By the way, what's the path to your db? You can replace your name with something else.
 
I tend to use server share names for all paths since I can't rely on everyone having the same mapped drives:
development code is in MN-Data\ndc\Invision Support\_Gexter Source Code\
data tables are in different files in subfolders under that

When it works I move it to a production folder. System settings tell the app where to find its data.
 
Have you Package and Signed yet?

Also, move the files to a Trusted location on your local drive and test it there. It may not like the mapped drive as a Trusted location.
 
I'm going to have to set this aside for a bit. A production issue just came up in a different system.
I'm not understanding why the app was fine with the trusted location on the server until now.
 
There are three Access applications in the same directory on the server. All have splash screens that instantiate some classes and get setup parameters. Two of them run fine after compile. Only one fails to fire its events. None are packaged and signed, so I'm not sure it makes sense for that to be the problem. What other conditions could cause events to fail to fire?
 
Are they the same code though? Copy the code from your working db and paste it in your failing db and see if it fires. Or put a Msgbox there to see if it fires.
 
Yes, they are the same code. Found the problem, a logic error in another form in the app. Should have prevented the compile.
 
Yes, they are the same code. Found the problem, a logic error in another form in the app. Should have prevented the compile.

How would a logic error be found in the compile process? If it is invalid code it would but if the code is valid then it wouldn't know.
 
The logic could be when the compiler never gets into an IF block for example. That's the way I understand it.
 
All modules are set to "option explicit". An update had caused a call to routine that had been commented out. Using a non-defined variable always stops the compile in its track with the explicit option. I had thought a non-defined routine would cause the same.

Some days I do miss COBOL. The blank screen and a C:\ prompt. Error messages that told us everything we wanted to know and then some.
 

Users who are viewing this thread

Back
Top Bottom