PC Review


Reply
Thread Tools Rate Thread

Before update, after update or change event? or does it matter?

 
 
Chris K
Guest
Posts: n/a
 
      3rd Oct 2010
Couple questions

I use bound dropdown list for quite comprehensive display of future booking
dates including how many are already booked on those dates and same combo to
choose booking date for the client record - the problem is I need to guard
against them changing dates by accident when they're using the dropdown just
to look at future bookings

Private Sub Booked_AfterUpdate()
With Me.Booked
If Not IsNull(.OldValue) And .Value <> .OldValue Then _
If MsgBox("Change " & .OldValue & " to " & .Value & "?",
vbYesNo) = vbNo Then .Value = .OldValue
End With
End Sub

Works fine but my questions are

1/ Should I use before update, after update or change event? or does it
matter?

2/ Why wont it let me 'Undo' e.g.

If MsgBox("Change " & .OldValue & " to " & .Value & "?", vbYesNo) = vbNo
Then .Undo 'It doesn't 'undo' the changes no matter which event i use?
hence I used .Value = .OldValue






 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo No Change and After Update Event Yvonne Microsoft Access 3 8th Jun 2007 09:38 PM
Before Update event prevents data change =?Utf-8?B?cnVzdGxl?= Microsoft Access Forms 2 29th Jul 2006 09:09 PM
Cancel a change in the before update event of a txtbox Bill R via AccessMonster.com Microsoft Access Form Coding 5 19th Dec 2005 01:08 PM
Does the order of the update matter? TheNortonZ Microsoft ADO .NET 6 18th Nov 2004 07:46 PM
change event/after update event?? scrabtree23 Microsoft Excel Programming 1 20th Oct 2003 07:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:59 AM.