Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form On-Events not accessible

Status
Not open for further replies.

FinalPrime

Technical User
Jul 28, 2003
50
US
I have added a command button on a perfectly good Form
I can no longer access the code behind any On-Event on the Form. I have checked Security and I still have full permissions.

I have removed the new command button.
I have done a 'Compact and Repair' I can do anything in this application except access the Event Codes on this one Form.

I have, as a test, added Events to the Form but can't not acces the Sub. I have checked for problems with the Form properties. The object browser does no list this Form
The form will not longer do a thing except display data.

I suspect since the Form won't do a thing and I can not get to the code, all the code has somehow vaporized. Yet I can't add on-event code. (That's a baffle.)

I suspect the new command button had nothing to do with this. The problem could have been a 'pre-existing' condition and I just noticed the problem after adding the command button

Any insight to The Simple thing I must have overlooked?
Are there any more options out of this? Is this just an Access anomily? I perfer not to restore since a lot of
coding has been done since the last backup.

thanks
 
FinalPrime:

Had you tried to create a new module?
had you tried to create a macro and converted to vba?

Go to the main menu-->Tools -->Options--->Forms/Reports
Check the option (just to test) Always use Event procedures

Don't get me wrong, but verify that no one saved the db as *.mde and deleted the orignal

try importing all objects to a new db. In case your db is corrupted it could solve the problem.

Check other apps. and see if you have access to the IDE

Some of it must work.

Good luck

Estuardo.

Note:
Do you mind leting me know the results?
 
It bothers me that the Object Browser doesn't list your form. That suggests to me that your database has been corrupted.

I would try selecting the form in the DB window, and then choosing View|Code from the menu. If that opens a module window, I would copy and paste the code to a text file. If it doesn't, I don't think you're going to be able to recover your code at all.

Next, create a new database and import everything from the corrupted one. Be sure to click the Advanced button and select to import the relationships, menus and toolbars, and import/export specs as well. If the form was accidentally deleted, but the deletion didn't completely occur, there is a chance that importing it will recover it.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
EstuardoSierra,

I deleted the corrupted Form (In my view, had to have been).
I imported the same Form from a backup.
I reviewed the code associated with
the (backup)Form and determined I was back where I
started. All now works fine.

Thanks for you help,
Final Prime
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top