I'm using the code below in a form control.
Dim mess As String, answer As String
mess = "Are you sure you want to change this?"
answer = MsgBox(mess, vbYesNo, "Subject ID")
If answer = vbNo Then
Cancel = True
Me.Undo
End If
As it stands, the default button is "Yes", but I want it to be "No".
How do I do that?
Paul Fenton
> I'm using the code below in a form control.
>
[quoted text clipped - 8 lines]
> As it stands, the default button is "Yes", but I want it to be "No".
> How do I do that?
Dim mess As String, answer As String
mess = "Are you sure you want to change this?"
answer = MsgBox(mess, vbYesNo + vbDefaultButton2, "Subject ID")
If answer = vbNo Then
Cancel = True
Me.Undo
End If

Signature
Jeff Conrad
Access Junkie
Bend, Oregon
Paul Fenton - 11 Mar 2005 02:59 GMT
Jeff, thank you so much!
Paul Fenton
Access Struggler
>> I'm using the code below in a form control.
>>
[quoted text clipped - 16 lines]
> Me.Undo
> End If
Jeff Conrad - 11 Mar 2005 04:34 GMT
> Jeff, thank you so much!
You're welcome, glad to help.
> Paul Fenton
> Access Struggler
<g>
Come here more often and you won't be!
We're open almost every day of the year.
(We're closed on the last day of each year for Troll fumigation)

Signature
Jeff Conrad
Access Junkie
Bend, Oregon