Here is what I have always used and its straight from the Access help:
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to continue ?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "MsgBox Demonstration" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
MyString = "Yes" ' Perform some action.
<**insert your code here if the user clicks yes**>
Else ' User chose No.
MyString = "No" ' Perform some action.
<**insert your code here if the user clicks no**>
usually, if you just want to cancel the current action, I just put a number 2 for cancel
End If
Also, if you just want to do a simple msgbox in the future, you can do this: msgbox "You cant do that here",vbOkOnly + vbInformation,"msgbox title goes here"
When you start the msgbox, it will give you intellisense and show you what goes where, just follow along and BAM, you want fries with that?
Take out what you dont need and you can customize your buttons in the Style above.. msgbox help in Access has more information as well..