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!

Unloading Forms in VBA 1

Status
Not open for further replies.

SteveCarrier

Programmer
Aug 6, 2002
34
CA
I am using a bunch of dummy forms as SQL recordset containers. Once my code is finished and the program returns to the form I have noticed if I go to the Unhide forms option in the window menu all of the dummy forms that my code used are still in memory. I believe this is causing an Error 2101 "Setting isn't valid for this property" error once in a while and generally isn't good practice anyways.

I have tried to Unload the forms:

Unload Form_frmDummyPage
Unload Form_frmDummyProduct
etc.

No Luck! I get an error 361. "Can't Load or Unload this object"

If anyone know how to unload forms from memory properly that would be great, and if anyone has had similiar problems with error 2101 i would love to hear about that also!

Thanks alot!

Steve Carrier
 
Try: docmd.close, acform, "Form_frmDummyPage" etc.
This will close (and thereby unload)the var. forms.

Herman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top