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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete Class Object (module) from VBA window 1

Status
Not open for further replies.

lorirobn

MIS
Mar 15, 2005
450
US
Hello,

I have some forms where I have deleted all their VBA code; is there a way I can now delete the modules from my Microsoft Visual Basic window? (folder at top of hierarchy is Microsoft Office Access Class Objects). I still have the forms, but would like to clean up and get rid of objects that are not really there (they are blank).

Cannot figure out how to do this. If I right-click on the object, the 'remove form' option is dimmed (probably because an associated form exists?).

Thanks,
Lori
 
Lori
Are the forms based on tables or queries? If so, do those queries have related tables in them?

If they are based on queries, can you not go into the form itself, and clear the Record Source for the form, and then following that delete the form?

Tom
 
Don't delete anything from the project explorer of the VBE window! I think you will find that deleting (or trying to do so) form/report module thingies from the VBE window, may cause corruption.

To remove form/report modules, enter the individueal forms and reports, and set their hasmodule property to no.

If you've alredy tried this, I'd recommend importing all objects to a new database.

Roy-Vidar
 
Roy,

I've never heard of that corruption risk before. Thanks for the useful warning!

Ed Metcalfe.

Please do not feed the trolls.....
 
I set HasModule property to 'No' and it worked fine!

Sounds like you have run into some problems with removing these modules from the project explorer, which is exactly what I was trying to do! So far everything looks ok on my db, so I don't believe I corrupted anything (could not even try to delete that way, as there was no way to do so!).

Thanks!

Lori
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top