Results 1 to 3 of 3
  1. #1
    dunc723 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    28

    Can Access be programmed to close itself?

    A user needs to get a new document number from a table, which is then inserted into a new Excel file. I have most of this worked out - the user clicks a desktop icon, which opens a simple Access database; a form automatically opens and gets the next document number from the table; the user populates three other fields and clicks OK; the record is saved, the Excel template is opened and the document number inserted in the appropriate cell. (If this sounds familiar, I posted a question last week on how best to make all that happen, but I have worked this much out.)



    The final step: Instead of the user having to close the database (or potentially forgetting to close it), it should close itself and exit. Is that possible?

    Thanks!

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Try:
    DoCmd.Quit
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    dunc723 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    28
    I knew it had to be something simple! Thanks for your quick and direct response.

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

Similar Threads

  1. Replies: 16
    Last Post: 02-14-2014, 09:02 PM
  2. Replies: 4
    Last Post: 01-31-2014, 11:47 AM
  3. Access does not close Excel App
    By John_G in forum Programming
    Replies: 4
    Last Post: 09-04-2012, 03:00 PM
  4. Use Switchboard to close db AND Access
    By HeadGasket in forum Forms
    Replies: 1
    Last Post: 02-01-2012, 07:08 PM
  5. Replies: 2
    Last Post: 06-20-2011, 03:10 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