By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Problem with On Load event for form in .accde file

patjones
Expert 100+
P: 931
Hi everyone:

I have a form in my database called "frmChecks". In the properties for this form, I set On Load to [Event Procedure], which points to some code in VB that maximizes the form window and sets a background color gradient for the form.

Everything works fine when I open the database and start the form in .accdb mode. However, when I convert the database to .accde mode and open it, I get an error that says "The expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events. *The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. *There may have been an error evaluating the function, event, or macro."

To see if it was any of my VB code inside the module that was causing this, I commented it all out just leaving a blank sub routine, and I still get this error. I also tried On Open and On Activate to no avail.

Any ideas? Thanks!
Aug 17 '07 #1
Share this Question
Share on Google+
4 Replies


JConsulting
Expert 100+
P: 603
Hi everyone:

I have a form in my database called "frmChecks". In the properties for this form, I set On Load to [Event Procedure], which points to some code in VB that maximizes the form window and sets a background color gradient for the form.

Everything works fine when I open the database and start the form in .accdb mode. However, when I convert the database to .accde mode and open it, I get an error that says "The expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events. *The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. *There may have been an error evaluating the function, event, or macro."

To see if it was any of my VB code inside the module that was causing this, I commented it all out just leaving a blank sub routine, and I still get this error. I also tried On Open and On Activate to no avail.

Any ideas? Thanks!

You cannot open an object for design at runtime with a compiled database.
Aug 18 '07 #2

patjones
Expert 100+
P: 931
You cannot open an object for design at runtime with a compiled database.
I'm not trying to open anything for design. I just want to run it...
Aug 18 '07 #3

JConsulting
Expert 100+
P: 603
I'm not trying to open anything for design. I just want to run it...
If you commented out all the code for that form, and it is still giving you an error...then chances are the error is coming from something else. Hard to say though.

You understood what I meant about design at runtime?

Some properties cannot be set once your application is compiled.

How are you opening the form?
Aug 18 '07 #4

patjones
Expert 100+
P: 931
If you commented out all the code for that form, and it is still giving you an error...then chances are the error is coming from something else. Hard to say though.

You understood what I meant about design at runtime?

Some properties cannot be set once your application is compiled.

How are you opening the form?
Well, I'm certain that it's none of the code in my VB module for loading the form. Can't be the problem if I commented it out right?

I guess I'm not clear about design at runtime. I mean, when I open the database up, the form is supposed to be there and ready for the user to do things with.

What I just realized though is that I did make a simple switchboard form for the database. Maybe I should have that form be what comes up upon opening the database, then let the user open the other form from there and see what happens...
Aug 19 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.