-
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.
-
What does the standard message say? What do you want it to say?
-
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
-
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
-
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.
-
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.
-
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
-
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
-
Forum Rules
|
|