Results 1 to 7 of 7
  1. #1
    kdbailey is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    228

    DoCmd.Close Not Working

    I am unsure why this command is not working.



    Even when I use this line, it does nothing...

    Code:
    DoCmd.DoCmd.Close acForm, Me.Name

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    If you are trying to close the form you currently have focus on

    DoCmd.Close

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Is that code in a button Click event? Is there other code in that procedure? Does it execute?
    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.

  4. #4
    kdbailey is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    228
    It is a click event, but nothing happens. I put a msgbox in it, nothing.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Does the button Click event property have [Event Procedure] in it?
    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.

  6. #6
    kdbailey is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    228
    Yes, that was the first thing I checked.

  7. #7
    kdbailey is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2012
    Posts
    228
    Hmmm... weird. Suddenly now it works. Not sure if it just required a database restart or what. Working now.

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

Similar Threads

  1. DoCmd.OpenReport not working correctly?
    By XenoZephyr in forum Access
    Replies: 2
    Last Post: 07-02-2013, 12:08 PM
  2. DoCmd.Close OpenArgs NOT WORKING
    By clchris_80 in forum Access
    Replies: 1
    Last Post: 01-19-2013, 09:07 PM
  3. Close Form button not working
    By RedGoneWILD in forum Forms
    Replies: 2
    Last Post: 06-25-2012, 07:02 AM
  4. DoCmd.OutputTo not working
    By arunkumar213 in forum Access
    Replies: 1
    Last Post: 09-08-2011, 10:41 PM
  5. docmd.runsql not working
    By Rameez in forum Programming
    Replies: 3
    Last Post: 08-07-2009, 10:07 AM

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