A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can ACCESS prompt user on data change?



 
 
Thread Tools Display Modes
  #11  
Old January 14th, 2009, 12:24 PM posted to microsoft.public.access.gettingstarted
John Spencer (MVP)
external usenet poster
 
Posts: 217
Default 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  
Old January 15th, 2009, 02:00 AM posted to microsoft.public.access.gettingstarted
AccessVandal via AccessMonster.com
external usenet poster
 
Posts: 461
Default 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

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.