First, the arguments you specify as Success and Update should be strings. I
assume they are not variable names, so they should be specified as "Success"
and "Update" (including the quotes).
Second, MsgBox is a function that returns a result. It can be called as a
Sub if you want to ignore the result, but this must be done differently,
either using Call or omitting the parentheses:
To save the returned result (only necessary if you have more than one
button:
VariableName = MsgBox("Success", 64, "Update")
To ignore the result, either:
Call MsgBox("Success", 64, "Update")
or:
MsgBox "Success", 64, "Update"
Note that in the last case, the parentheses are omitted.
Also, the second argument, 64, indicates that the message box should display
the "i" information icon. 64 means nothing to someone reading your code, so
it would be better to use the built-in constant that is provided for the
purpose:
MsgBox "Success", vbInformation, "Update"
Or, even better, to indicate which buttons are displayed:
MsgBox "Success", vbOKOnly + vbInformation, "Update"
--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
Bomber said:
Hi all,
should this be working for me ?
MsgBox(Success, 64, Update)
I get a Compile Error, expected: =
Any ideas ?
cheers,
Adam