Countdown timer on a continous form

mikeg51

New member
Local time
Today, 10:41
Joined
Aug 15, 2008
Messages
5
Hi there, I've been browsing the groups but I haven't seen this posted before.
I'd like to have a separate countdown timer for each record on a continous form.
The below code works fine as a timer but it displays the same for each record. Is it possible to have them running separately?

Dim lng As Long, sec As Long
lng = DateDiff("s", Nz(Me!txtTime, Date), Now)
If 60 - (lng Mod 60) = 60 Then
sec = 0
lng = lng - 60
Else
sec = 60 - (lng Mod 60)
End If
lng = 44 - Fix(lng / 60)
If lng < 1 Then Me!txtCountDown.ForeColor = 255
Me!txtCountDown = Format(lng, "00") & ":" & Format(sec, "00")

Thanks!
Michael
 
Michael:
The thing about continuous forms--if you look at one in design view--is that there's only one. It's sort of magic that it can display different data from different records, but if you set a property of an object in code, say the value of an unbound textbox, they all change. Unless they're bound.
It's only a fancy illusion that there are 'many' objects there for you to work with. :(
Mark
 
So does that mean it's possible but it has to be bound to a field in the underlying table or that it's not possible at all?
 

Users who are viewing this thread

Back
Top Bottom