By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

If .OldValue changes

P: n/a
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 = " &
With rsDiary
If Me!LeaseExp <> Nz(Me!LeaseExp.OldValue, 0) And Not
IsNull(Me!LeaseExp) Then
.FindFirst "EventID = 1 AND NOT Done"
If Not .NoMatch Then .Delete
!DueDate = Me!LeaseExp
!EventID = 1
!Event = "Lease expires on " & Me!LeaseExp
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
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.