Use the Msgbox() function instead of the Msgbox statement.
Example:
If Msgbox("Do you want to?", vbYesNo + vbQuestion) = vbYes Then
'do whatever here
End If
You can also assign the returned value to a variable then use the variable.
lngRetValue = Msgbox("Do you want to?", vbYesNoCancel + vbQuestion)
Select Case lngRetValue
Case vbYes
'do yes stuff here
Case vbNo
'do no stuff here
Case vbCancel
'do cancel stuff here
End Select
--
Wayne Morgan
MS Access MVP
<dr************@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
How do I retrieve the values taken from user in a dialog box?