Results 1 to 8 of 8

Thread: Change Append Query Message

  1. #1
    Join Date
    Aug 2008
    Posts
    52

    Change Append Query Message

    Hi,
    Please guide me on how best to change the default message that an append query pops up to a customized message.
    Thank you.

  2. #2
    Join Date
    May 2006
    Posts
    407
    What does the standard message say? What do you want it to say?

  3. #3
    Join Date
    Aug 2008
    Posts
    52

    Re-Append

    You are about to append 1 row(s)

    Once you click yes, you cant use the undo command to reverse the changes. Are you sure you want to append the selected rows
    Yes No

  4. #4
    Join Date
    May 2006
    Posts
    407
    This is a great resource that explains, and shows, how to disable this warning message, and how to turn it back on.
    http://support.microsoft.com/kb/229802

  5. #5
    Join Date
    Aug 2008
    Posts
    52
    Thanks for ur reply. I never want to switch off the message. What I want is to change the message to mine. What VBA code should I apply. Thank U.

  6. #6
    Join Date
    May 2006
    Posts
    407
    In order to change the message to your own message:
    1. Switch off the Access message (using the code shown in the link I shared in my last message)
    2. In your VBA code, just before running the query, post your own message using MsgBox.
    3. Turn Access messages back on.

  7. #7
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275
    Use code similar to this

    DoCmd.SetWarnings False
    MsgBox "you are appending records", vbOKCancel, "append"
    DoCmd.OpenQuery "query1"
    DoCmd.SetWarnings True

    The set warnings turns the default messages off and on respectively.
    Msgbox displays your message
    Openquery runs your append query

    You can expand the code to trap the user's response to the message and run the query etc depending on the response.
    Allan

  8. #8
    Join Date
    Aug 2008
    Posts
    52

    Thanks

    A great thanks to all u guys that responded to my post. They worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •