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

Form cannot open anymore

P: n/a
I have a form with a Collection variable to store several objects with
WithEvents children, to have all controls of a certain type behave
alike. This has been working for the last day, since creation.

Suddenly I cannot open the form in normal view anymore. "the OnOpen
property does not yield a valid event procedure, or an error occurred in
a function" -- the wording is in Dutch, that wouldn't help you
Normally, I recognize this as error 2501. I don't have compile
errors--all modules compile fine.

When I remove all code from the form, it opens all right. As soon as I
refer to the Collection variable, the error occurs.

I cannot recall my last design action on the form.

I don't have MISSING references.

I checked on another machine to see if my Access has become corrupt, it
behaves the same way there.
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bas Cost Budde" <b.*********@heuvelqop.nl> wrote in message
news:co**********@news2.solcon.nl...
I have a form with a Collection variable to store several objects with
WithEvents children, to have all controls of a certain type behave alike.
This has been working for the last day, since creation.

Suddenly I cannot open the form in normal view anymore. "the OnOpen
property does not yield a valid event procedure, or an error occurred in a
function" -- the wording is in Dutch, that wouldn't help you
Normally, I recognize this as error 2501. I don't have compile errors--all
modules compile fine.

When I remove all code from the form, it opens all right. As soon as I
refer to the Collection variable, the error occurs.

I cannot recall my last design action on the form.

I don't have MISSING references.

I checked on another machine to see if my Access has become corrupt, it
behaves the same way there.
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea

Nov 13 '05 #2

P: n/a
Allen Browne wrote:
Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"


That was not sufficient, but it brought up memories of previous posts
about corruption. I found that copying the form, deleting the original
and renaming the copy solved the discrepancy.

Because I got across the same problem, I was able to narrow down the
cause: a button on the form put it in design view. Although I cannot
exactly understand why that causes corruption, it was easy to circumvent.

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.