Results 1 to 4 of 4
  1. #1
    GeorgeJ is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    67

    Can't load form : error 361

    Hello,



    This is a real newbie question. I have used Forms extensively in Excel and am trying to use them in Access. I recently created the file “FormTest01.accdb”. The purpose is to familiarize my self with creating forms in Access. The file has no tables, and just one form – Form1, and just one module - Module 1. The form has just one sub in its code file,

    Private Sub Form_Load()
    MsgBox "Hello"
    End Sub

    And there is one sub in Module 1,

    Sub Loadform()
    Load Form_Form1
    End Sub

    When I place the cursor inside this sub LoadForm and run it, I do see the message “hello”, but then instead of running the form, I get the message “Error code 361 – cannot load this object”. I looked up error 361 and what I got wasn't helpful.

    Any suggestions would be greatly appreciated.
    Hello,
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You don't want to Load the form, you want to open it.

    DoCmd.OpenForm "Form1"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    GeorgeJ is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    67
    That seems to work. Thanks. But now I have created a button "Command1" on the form with the code

    Private Sub Command1_Click()
    Unload Me
    End Sub

    When I click the button I get the following message: "Error 361 : Can't load or unload this object"
    Any idea why?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You don't unload, you close.

    DoCmd.Close acForm, "Form1", acSaveNo

    Have you examined any developed databases with VBA coding?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-18-2014, 12:35 PM
  2. On Load form error
    By Bosakie in forum Access
    Replies: 1
    Last Post: 10-09-2014, 07:27 AM
  3. Replies: 2
    Last Post: 09-16-2014, 06:17 AM
  4. Replies: 15
    Last Post: 07-24-2013, 12:22 PM
  5. ApplyFilter to form on Load error
    By rivereridanus in forum Access
    Replies: 1
    Last Post: 08-18-2011, 12:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums