microsoft access day countdown

Posted on 2011-10-20
Last Modified: 2012-08-13
Hi, I am looking for a day countdown timer for one of my forms. Is this an easy thing to do. I see lots of articals on timers but nothing for days.

On my main form I would like to have on it a countdown in days and maybe time to a specific point say countdown to christmas for example. Any ideas, or is this a big question
Question by:tucup
    LVL 119

    Assisted Solution

    by:Rey Obrero

    you can use

    msgbox DateDiff("d",Date(),DateSerial(Year(Date()),12,25)) & " Days before Christmas"
    LVL 74

    Accepted Solution

    <I see lots of articals on timers but nothing for days.>
    The reason is that there are a lot of issues when doing things on a "Timer" across Days
    You must *Guarantee* that the machine will remain on over those days

    If you simply need a countdown till a date, use something like this as the controlsource property for a textbox in a form/report:

    Here "Date()" will always be the current date.

    LVL 119

    Expert Comment

    by:Rey Obrero
    in your form, place a textbox and set the Control Source to
    =DateDiff("d",Date(),DateSerial(Year(Date()),12,25)) & " Days before Christmas"
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    capricorn1's is better...
    LVL 119

    Expert Comment

    by:Rey Obrero

    using a fix date ( #12/25/2011# - not advisable) means you have to change the year every year

    Author Comment

    \thanks, I wasnt expecting you to solve it so soon, well done thx to you both

    Author Closing Comment

    Wow, a date is so quick to add but I am glad you pointed me in the right direction, I may have messed up otherwise

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now