Results 1 to 8 of 8
  1. #1
    bcmarshall is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    95

    How can I get a form to open for final data entry after initiating database close?

    I want to have a form open as the database is closed for people to enter one final bit of information about their productivity, and then email that to a supervisor, and then complete the close of db.



    Is there a way to interrupt the sequence that begins with the Close Database command? What about the X in the top right corner? Can that be interrupted?

    As always, all assistance is appreciated.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    Realistically no, if they close the database without using your form button you're pretty much hosed. If your users are reliably using the form button then you just make sure when the 'close' button is clicked it opens your 'final' form and when they click 'add information' on their productivity information that's when you issue the database close command.

  3. #3
    bcmarshall is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    95
    I kinda figured as much. Ideally I'd like to remove the X upper right from the DB, and remove the Close Database option from the menu. That would leave the only way to close the db as a form button, and of course then it's not a problem to accomplish.

    Is it possible to remove the X and modify the menu?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I haven't messed around with it for a long time but there used to be a way to create custom toolbars so you COULD substitute your own tool bar and remove the 'close' or 'exit' options but that doesn't prevent the user from using the x in the upper right of the application window. I'll have another look this weekend and see if I can find something.

  5. #5
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    if they always finish on the same page before they close, you could use the onclose event of the form to open your final form.

  6. #6
    bcmarshall is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    95
    Thanks, Vic. I do have a final form and I first put a MsgBox in the OnClose (I put it on the top of other instructions already there). It fires without problem. Then I put a CancelEvent in order to make it possible to interrupt the cycle and open the form. That didn't work.
    I didn't go straight to OpenForm because it seemed pointless. If the cycle isn't interrupted the final form will just close anyway. Do you think it's worth a test?

  7. #7
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    what are you scared of? make a copy of the form and give it heck. i ran with one of mine and it worked great.
    Code:
    Private Sub Form_Close()
    DoCmd.OpenForm "adminf"
    End Sub

  8. #8
    bcmarshall is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    95
    I tried exactly as you described, and it didn't work. The form popped open, then closed and the DB closed as well.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-20-2015, 10:31 AM
  2. Macros for a web database data entry form
    By Twinnie in forum Access
    Replies: 13
    Last Post: 05-29-2014, 01:33 PM
  3. create a button to open a form for data entry
    By dave john in forum Programming
    Replies: 3
    Last Post: 08-21-2012, 08:41 AM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. Open report from data entry form
    By pbuecken in forum Forms
    Replies: 5
    Last Post: 01-14-2012, 12:07 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