A
Alex
Hi guys,
The last entries in [UsedUnits] and [UsedKG] (and
[RecUnits] and [RecKG]) are not being updated in a table
and form. I'm using a continuous form.
Set dbs = CurrentDb
Set rstRecycled = dbs.OpenRecordset("tblRecycled")
With rstRecycled
intRecordCount = .RecordCount
If intRecordCount <> 0 Then
.MoveFirst
.MoveLast
.MoveFirst
While Not .EOF
.Edit
snlRecUnits = ![RecUnits] - ![UsedUnits]
![RecUnits] = snlRecUnits
snlRecKG = ![RecKG] - ![UsedKG]
![RecKG] = snlRecKG
![UsedKG] = 0
![UsedUnits] = 0
.Update
intDoEvents = DoEvents()
.MoveNext
Wend
End If
Me.Refresh
rstRecycled.Close
dbs.Close
Could you please advise anything?
Thanks
The last entries in [UsedUnits] and [UsedKG] (and
[RecUnits] and [RecKG]) are not being updated in a table
and form. I'm using a continuous form.
Set dbs = CurrentDb
Set rstRecycled = dbs.OpenRecordset("tblRecycled")
With rstRecycled
intRecordCount = .RecordCount
If intRecordCount <> 0 Then
.MoveFirst
.MoveLast
.MoveFirst
While Not .EOF
.Edit
snlRecUnits = ![RecUnits] - ![UsedUnits]
![RecUnits] = snlRecUnits
snlRecKG = ![RecKG] - ![UsedKG]
![RecKG] = snlRecKG
![UsedKG] = 0
![UsedUnits] = 0
.Update
intDoEvents = DoEvents()
.MoveNext
Wend
End If
Me.Refresh
rstRecycled.Close
dbs.Close
Could you please advise anything?
Thanks