Results 1 to 6 of 6
  1. #1
    coach32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    47

    Show a message without the prompts


    I have a form that operatives enter details into and when they enter information
    into the final field (which they must do), the database shuts down.
    Is it possible to show a message "Record Added" just before the database closes
    that doesn't require the operative to click okay?
    I know I can create a small pop up form with 'Record added' on it, but I was just
    wondering if a message box can show briefly before closing itself.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you must click away to trigger the afterupdate event.
    THEN the message can show.

    Code:
    sub txtFinalBox_afterupdate()
       msgbox "Record Added"
       docmd.quit
    end sub

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    The OP doesn't want the users to have to click to close the Messagebox...and the answer to that is 'no.' As you suggested, you'll have to create a Form and with a Timer event close it after X number of seconds.

    The code to close it is simple. Assuming that the Form is named RecordAddedForm...

    Code:
    Private Sub Form_Load()
       TimerInterval = 3000
    End Sub
    
    Private Sub Form_Timer()
       DoCmd.Close acForm, "RecordAddedForm"
    End Sub


    An Interval of 3000 is for 3 seconds, but it sometimes takes a second or two before the Timer kicks in, so adjust that as you wish!

    You'll need to open RecordAddedForm as you unload your primary Form.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Then you don't need the message.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Just add a TEXT BOX to the bottom of your screen

    when the record is saved just do something like


    me.SaveMessageTextBox = "RECORD WAS SAVED"
    doevents

    then close your database.

    Then the message isn't a message box, but the user can still see it before you close. Though as missling pointed out, it may be so fast the user won't see it and then you would have to add a timer event to the close function.

  6. #6
    coach32 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    47
    Thank you very much. I will give the new Form and Timer a go.

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

Similar Threads

  1. Replies: 6
    Last Post: 01-08-2015, 03:21 AM
  2. Help with save prompts in main and sub forms
    By aer in forum Programming
    Replies: 1
    Last Post: 08-07-2014, 02:35 PM
  3. Show error message after query with bad parameters
    By funkygoorilla in forum Queries
    Replies: 16
    Last Post: 01-16-2012, 12:37 PM
  4. turning off safety prompts
    By rbtrout in forum Access
    Replies: 4
    Last Post: 04-26-2011, 04:26 PM
  5. Run Query without prompts
    By gailoni in forum Queries
    Replies: 4
    Last Post: 11-03-2008, 01:42 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