I am attempting to use "DoCmd.DeleteObject acForm, "Form1"" to erase a temporary form that I partially design from VBA code based on a template. I get the message that this cannot be done while the database is open. How can I get arround this problem?
I use "copy" command to make a copy of the template which I then open in design mode to allow modifications from VBA code. Thereafter I open the form. I tried to use "new" but that opens the form directly, i.e. not in design mode.
I understand that deleting a form class object from VBA code may sound somewhat absurd but the since the command is available I tried it anyway. Besides this delete problem all is working fine to this point.
hano
I use "copy" command to make a copy of the template which I then open in design mode to allow modifications from VBA code. Thereafter I open the form. I tried to use "new" but that opens the form directly, i.e. not in design mode.
I understand that deleting a form class object from VBA code may sound somewhat absurd but the since the command is available I tried it anyway. Besides this delete problem all is working fine to this point.
hano