
19-Nov-2005, 22:00 PM
|
 | Guest | | | | | | | | |
| Re: Reverting drop-down box value
"John Vinson" wrote in message
news:eqqsn1l9gvp0iii8hecfepcdovn8n7248e@4ax.com...
> On Fri, 18 Nov 2005 22:47:00 -0000, "Someone"
> wrote:
> Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/7745-reverting-drop-down-box-value.html
>>Hello
>>
>>I have entered the following code in the AfterUpdate property of a
>>drop-down
>>box called 'Status' (I found this in a reply by Allen Browne to someone
>>else, so thank you!).
>>
>> Dim strMsg As String
>> With Me.Status
>> If .Value <> .OldValue Then
>> strMsg = "You have changed the Status from " & .OldValue & _
>> " to " & .Value & "." & vbCrLf & "Continue?"
>> If MsgBox(strMsg, vbYesNo + vbQuestion) = vbNo Then Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=7745
>> .Undo
>> End If
>> End If
>> End With
>>
>>The drop-down box is bound (as is the whole form). If the user selects
>>no,
>>how can I get the original value of the drop-down box to reappear? I'm
>>worried that users who select no and don't see it revert back will think
>>there's a problem.
>
> Instead of undo, put
>
> Me.Status = Me.Status.OldValue
>
> though actually Undo should have the same effect... doesn't it?
>
> John W. Vinson[MVP]
Marvellous - it works!
The Undo command didn't work for me. I was surprised, hence why I posted to
the group.
Thank you very much for your reply.
M |