command button defaults

  • Thread starter Thread starter Burt Arkin
  • Start date Start date
B

Burt Arkin

When seeking a user's response to code vbYesNoCancel
(Access2000), how do I make the button default to Cancel
or No? I'm sure I'm missing something very obvious.
Thanks in advance.
 
the MsgBox Function topic in VBA Help will answer your question, including a
coding example. in your procedure, type Msgbox and then press the left arrow
key once to move your cursor back "into" the word. then press F1.
 
MsgBox("My text", vbYesNoCancel + vbDefaultButton3)

Will setfocus on the cancel button
Perhaps superfluous:
in above msgbox
vbDefaultButton1 will setfocus to Yes button
vbDefaultButton2 same for the No button

Krgrds,
Perry
 
Back
Top