473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

If .OldValue changes

I'm using the following code, which is called from the BeforeUpdate event in
a form based on 'Tenant Details', to check for changes or additions to a
series of dates, and if changed, to edit another table - 'tDiary'.

Set rsDiary = db.OpenRecordset("SELECT * FROM tDiary WHERE LAN = " &
vLAN)
With rsDiary
If Me!LeaseExp <> Nz(Me!LeaseExp.OldValue, 0) And Not
IsNull(Me!LeaseExp) Then
.FindFirst "EventID = 1 AND NOT Done"
ws.BeginTrans
If Not .NoMatch Then .Delete
.AddNew
!LAN = vLAN
!DueDate = Me!LeaseExp
!EventID = 1
!Event = "Lease expires on " & Me!LeaseExp
.Update
ws.CommitTrans
End If

I have tested it extensively, and it works fine for me.
But with one client (using TS), it intermittently doesn't edit the Diary
table, and no errors are generated.
I can see no pattern to these failures, and cannot replicate them myself.

Can anyone see a problem with the code?
--
Bob Darlington
Brisbane
Nov 13 '05 #1
0 1331

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andi Plotsky | last post by:
I am running some code to validate the entry made into a form called NumberOfSamples. If validation fails, then I want to revert back to the old value. I keep getting an error msg that says: ...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
1
by: Scott R | last post by:
I want to be able to see the changes a user makes while in the Edit Mode of FormView. My understanding is that in the FormView ItemUpdating event, I should be able to get a collection of Keys,...
5
by: Dugo | last post by:
In Access 2003, I have a form (continuous form view) with several text boxes. The text boxes are not bound to a table since the layout of the form differs greatly from the structure of the...
1
by: gazelle04 | last post by:
I have these on BeforeUpdate event of a control If Me.txtAddress.Value <> Me.txtAddress.OldValue Then Me.txtGenInfo_UpdatedOn = Now Me.txtGenInfo_UpdatedBy = fOSUserName ...
2
by: Keith Wilby | last post by:
In A2k3 is it possible to determine if the OldValue property for a check box exists using code? Thanks. Keith.
1
by: DaAdmin | last post by:
I am making a Cancel button to close a form without saving. I check for changes in each control and if it changed I want to restore it to the old value, I get an error saying I can't assign value to...
8
by: Avi | last post by:
Hi all, I'm using string Replace(string oldValue, string newValue) and would like it to replace only full words that matches oldValue and not when oldValue is a substring of a larger word. ...
1
by: Allen Browne | last post by:
Testing if the new value is different from the old one avoids giving the message in these cases: a) It's a new record (so there was no old value.) b) No customer was specified previously (so the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.