Countdown Timer Days - End function (1 Viewer)

NickDenyer

Registered User.
Local time
Today, 10:19
Joined
May 2, 2012
Messages
57
Hi all!

I have one (field1) whereby users enter a date, and then I have another (field2) which shows a countdown timer (of sorts) which counts down from -30.

The justification is the data that has been entered must be approved within a 30 day timeline.

I use the following code on Field2 in the Control Source:

=Date()-30-[Field2)

and it shows such as this: -30

It works well, giving me a reverse counter (I looked everywhere on this site and could only find timers for seconds or to a specific date - I wanted mine automatically assigned).

However, naturally once that 30 days passes it begins to show like this: 1,2,3...

Is there anything I do to make the timer shut on '0' and instead show something like 'this records 30 day target has finished'.

I have another field (field3) which users enter a date to finalise the record - could this be a soultion???

Any help is appreciated!

Thanks!
 

plog

Banishment Pending
Local time
Today, 04:19
Joined
May 11, 2011
Messages
11,665
I use the following code on Field2 in the Control Source:

=Date()-30-[Field2)

That can't be accurate--you can't reference the field itself in its control source. Perhaps you meant the control source is based on Field1.

Whatever it actually is, you could test it for positive numbers and display whatever you want when the value goes over 0.

=Iif({Your Calculation Here}>=0, "30 Day Target Has Finished", {Your Calculation Here})
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:19
Joined
May 7, 2009
Messages
19,246
=IIF(Date()-30-[Field2] < 0, Abs(Date()-30-[Field2]) & " Days before approval", "30 days target has elapsed")
 

NickDenyer

Registered User.
Local time
Today, 10:19
Joined
May 2, 2012
Messages
57
=IIF(Date()-30-[Field2] < 0, Abs(Date()-30-[Field2]) & " Days before approval", "30 days target has elapsed")

Brilliant, thank you so much! I've only just seen this post, so sorry for the delay!
 

Users who are viewing this thread

Top Bottom