By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 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 = " &
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.