I have another quick question about the code I am writing. This time it is for a message box.
When my user completes the form he fills out, I have programed a message box to come up and tell the user that the updates are complete.
The user clicks "OK" and then another box comes up asking the user if he wants to close the form. This is a yes/no box.
When the user clicks "yes," The form clears and then closes.
Now, when the user clicks "No" I want the message boxes to close and for nothing else to happen. However, what is actually happening is that the user clicks "No" and the form still closes.
Below is the code. I am wondering if I am using the DoCmd.Close command wrong.
Also, how do you tell the form to just close the message box?
Thank you for any help you can give me!
MsgBox "Your Weekly Report Has Been Updated. Thank you!", vbInformation + vbOKOnly, "Update Complete"
MsgBox "Close Form?", vbInformation + vbYesNo
If vbYes Then
Dim i As Integer
For i = 1 To LstNewAct.ListCount
'Remove an item from the ListBox.
If vbNo Then