[AccessD] Destroying form object causes Access 2013 to crash?

Bill Benson bensonforums at gmail.com
Mon Jan 23 18:36:57 CST 2017


It doesn't make sense to me to set an object which has inherited an event
to nothing inside its own terminate event. Think about it from other
classes' standpoint.

In Excel's ThisWorkbook_Close() event
     Set ThisWorkbook = Nothing

Huh??

The only places to set something modeled after a class = Nothing is outside
of the class module code.

That's my 3/4 of a cent.

On Sat, Jan 7, 2017 at 2:35 PM, Ryan W <wrwehler at gmail.com> wrote:

> I am going through John Colby's class posts from 2009 and when I close the
> frmDemoCtls form my app crashes.
>
> Private Sub mfrm_Close()
>      Set mfrm = Nothing
> End Sub
>
>
> If I comment out set mfrm = Nothing then I do not get the crash.
>
> So far the rest of the demo works. The controls change colors, I even added
> a tab control to fetch the value of the tab being clicked with a new tab
> class.... so I know that the mfrm object is being set and utilized...
>
>
> Has anyone tried his class code in anything newer (Access 2010 or 2013 or
> 2016) since his postings?
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list