Results 1 to 6 of 6
  1. #1
    need_help12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    58

    Issue w/ VBA code for Opening/Closing Forms

    Good morning. First time writing any type of VBA code in Access, and seeking some assistance. On the switchboard I've created in my dummy db, I have 5 buttons that all function correctly in prompting new forms. As the end user clicks on any selection, I'd like the switchboard form to close once the new form opens. I was successful in making this happen for the first button "New Vendor Record", however as I attempted to duplicate this for the remaining buttons, I was only able to get the new forms to open, and not close the switchboard.



    I simply copied the code from the command button which does function, and applied the applicable command button and forms to it as needed, but to no avail. I'm assuming its not this simple.

    Would appreciate anyone with the VBA knowledge to chime in. I've attached my dummy db below.
    Attached Files Attached Files

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You do know that only the "New Vendor Record" button is the only button with [Event Procedure] code, right? The other 4 buttons are [Embedded Macro] buttons.

  3. #3
    need_help12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    58
    I do now......

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'll bet you will solve it now.

  5. #5
    need_help12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    58
    Rather quickly too, thanks for pointing out my oversight! Much appreciated for the help.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Anytime! I marked this thread as Solved for you using the Thread Tools at the top of the thread.

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

Similar Threads

  1. Closing 1 form and opening another
    By mulefeathers in forum Forms
    Replies: 13
    Last Post: 12-08-2011, 04:04 PM
  2. Two forms opening the same form
    By MikeMairangi in forum Forms
    Replies: 5
    Last Post: 08-31-2011, 01:55 PM
  3. opening access file issue
    By Masterkui in forum Access
    Replies: 3
    Last Post: 07-26-2011, 06:25 AM
  4. Don't want to save forms on Refresh or closing
    By accesscoder in forum Forms
    Replies: 5
    Last Post: 09-25-2010, 12:03 AM
  5. Access opening issue
    By tmcrouse in forum Database Design
    Replies: 1
    Last Post: 07-23-2010, 08:06 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