If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
what i have so far
Personally, I might use
IF Me.Sales.OldValue & "" Me.Sales & "" Then OR IF IsNull(Me.Sales.OldValue) = False Or _ Me.Sales.OldValue Me.Sales & "" Then John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County AccessVandal via AccessMonster.com wrote: Hi Ken, Do you think it would be better to use... If Not IsNull(Me.sales.OldValue) And ...... Ken Snell (MVP) wrote: Try this: Private Sub sales_BeforeUpdate(Cancel As Integer) Dim lngAnswer As Long If Not Me.sales.OldValue Is Null And Me.sales Me.sales.OldValue Then lngAnswer = MsgBox("Do you really want to change this sales person?", vbYesNoCancel, Question) Select Case lngAnswer Case vbYes ' do nothing Case vbNo, vbCancel Cancel = True Me.Sales.Undo End Select End If End Sub |
#12
|
|||
|
|||
what i have so far
Thanks John,
IF IsNull(Me.Sales.OldValue) = False Or Looks good, I do think "Not IsNull()" might not work sometimes. Thanks for the heads up. John Spencer (MVP) wrote: Personally, I might use IF Me.Sales.OldValue & "" Me.Sales & "" Then OR IF IsNull(Me.Sales.OldValue) = False Or _ Me.Sales.OldValue Me.Sales & "" Then John Spencer Access MVP 2002-2005, 2007-2009 The Hilltop Institute University of Maryland Baltimore County -- Please Rate the posting if helps you. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...arted/200901/1 |
|
Thread Tools | |
Display Modes | |
|
|