Append button

A

Alex Martinez

Hi,

I have a form that use a command button to append a table. I get the
standard Access message box saying "You are about to append 1000 row(s)
that has a Yes or No button. What I want to do is if the user press the yes
button I will have a message box appearing the same if the user press the no
button. How does one pick up the code from the Append message box after the
user press either button? I don't know how to tigger my message box after
the user made his or hers selection. Thank you in advance
 
P

PC Datasheet

Put the following code in the Click event of the command button:
Dim MsgStr As String
Dim TitleStr As String
MsgStr = "Are You Sure You Want To Append?"
TitleStr = "Confirm Append"
If MsgBox(MsgStr,vbYesNo,TitleStr) = vbNo Then
Exit Sub
End If
DoCmd.SetWarnings = False
DoCmd.OpenQuery "NameOfAppendQuery"
DoCmd.SetWarnings = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top