ACC2K: Startup form goes crazy

S

sebt

Hi

I've never seen this before in my life (12 years' Access development).
If I open a form by clicking on it, through VBA DoCmd.OpenForm, or
through a macro (including an AutoExec macro running automatically),
everything's fine.

If I open the form by setting the database's Startup Form
(Tools/Startup), Access goes paddling up Crazy River and does its best
to take me along for the ride. Events just don't fire. I can press
any control on the form and nothing happens. Debug.Prints as the first
line of event procs confirm that no events are firing at all.

This started with a Docmd.Maximize in Form_Activate being ignored; but
now it's affecting all event procedures.

Tried repairing and compacting, no effect. Compiled, decompiled,
recompiled, no effect. I'm just not going to use the Startup Form
property ever again (that kind of insanity is not what you need), and
go back to old-skool AutoExec macros.

anyone seen this?
 
K

Keith Wilby

sebt said:
Hi

I've never seen this before in my life (12 years' Access development).
If I open a form by clicking on it, through VBA DoCmd.OpenForm, or
through a macro (including an AutoExec macro running automatically),
everything's fine.

If I open the form by setting the database's Startup Form
(Tools/Startup), Access goes paddling up Crazy River and does its best
to take me along for the ride. Events just don't fire. I can press
any control on the form and nothing happens. Debug.Prints as the first
line of event procs confirm that no events are firing at all.

This started with a Docmd.Maximize in Form_Activate being ignored; but
now it's affecting all event procedures.

Tried repairing and compacting, no effect. Compiled, decompiled,
recompiled, no effect. I'm just not going to use the Startup Form
property ever again (that kind of insanity is not what you need), and
go back to old-skool AutoExec macros.

anyone seen this?

Nope, not in 15 years +. Have you tried importing all objects into a new
file?

Keith.
www.keithwilby.com
 
M

missinglinq via AccessMonster.com

I agree with Keith, do the blank db import all objects thing. The truly
bizarre in Access is usually a sign of corruption.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
S

sebt

Good advice, thank you everyone. Should have thought of the "import
into new DB" thing...
I took klaatu's advice and also wiped all the modules, copying them out
to .TXT files first them copying them back in again.

It now works.... for the moment...
Since Access keeps two verisons of the code (compiled/uncompiles) they can
get out of sync and cause (to quote old IBM jaron) "unpredictable results".

Final Note: I don't regard Macros as "old school", I think of them as
kindergarten.
Don't like macros myself either - horrible things. Only ever used
Autoexec before this new Tools/Startup/Startup Form business came in.

cheers


Seb
 
M

Marshall Barton

sebt said:
Good advice, thank you everyone. Should have thought of the "import
into new DB" thing...
I took klaatu's advice and also wiped all the modules, copying them out
to .TXT files first them copying them back in again.

It now works.... for the moment...
[]


Note that a common cause of that kind of corruption is
editing a form's module while it is still open in form view.
Best to ***always*** switch back to design view before
making any change. I recently had this happen to me when I
accidently bumped the tab key while in break mode.

It's not clear that copying to a new, blank mdb fixed the
problem. I think it more likely that in this case, copying
the modules to a text file and pasting them back was the
magic bullet that did the job. Many times, a decompile
would accomplish the same thing more easily.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top