Unload Me

Discussion in 'Microsoft Access VBA Modules' started by Jac Tremblay, May 1, 2010.

  1. Jac Tremblay

    Jac Tremblay Guest

    Hi,
    I have a form loaded as Modal and on the Cancel Button event, I want it to
    close (or unload).

    Private Sub cmdAnnuler_Click()
    MsgBox "me.Name = " & Me.Name ' To make sure it is the right one.
    Unload Me
    End Sub
    I get an error:
    Run-time error '361':
    Can't load or unload this object

    What is the problem?
    Thanks
    --
    Jac Tremblay
     
    Jac Tremblay, May 1, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Daniel Dickover

    Unload and OnError Events

    Daniel Dickover, Nov 26, 2003, in forum: Microsoft Access VBA Modules
    Replies:
    9
    Views:
    448
    Ken Snell
    Dec 3, 2003
  2. Harold

    Excel Won't unload from Memory

    Harold, Jan 26, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    9
    Views:
    611
  3. Guest

    Can't unload a form

    Guest, Nov 29, 2005, in forum: Microsoft Access VBA Modules
    Replies:
    3
    Views:
    2,315
    Allen Browne
    Nov 29, 2005
  4. Guest

    On Close vs. On Unload

    Guest, Apr 11, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    5
    Views:
    6,034
    Guest
    Apr 13, 2006
  5. Guest

    can't unload a form

    Guest, Aug 2, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    1,436
    Guest
    Aug 3, 2006
  6. Guest

    Close versus Unload, etc.

    Guest, Nov 21, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    2
    Views:
    653
    Guest
    Nov 21, 2006
  7. Mike P

    Programaticlly load/unload data

    Mike P, Feb 6, 2008, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    242
    Mike P
    Feb 19, 2008
Loading...