Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    show dates remaining (2003 sp2)

    I have a query, qryRemainingCalDaysByJob, its fields are: JobNumber, JobName, RemainingWDs, Today, RemainingCalDays.
    What I need to do is list in another query, the JobName and dates remaining, including today.

    Example:
    JobNumber=5170
    Today=7/27/07
    RemainingCalDays=3.69 (round to 4)
    ------- ----------
    5170 7/27/07
    5170 7/28/07
    5170 7/29/07
    5170 7/30/07

    I would like to be able to show all the jobs in this query this way, which has 12 jobs.

    thanks,
    jackal

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: show dates remaining (2003 sp2)

    You'd need to create a table with a single field TheDate of type Date/Time.
    Populate this table with all dates from (for example) January 1, 2007 until December 31, 2008.
    The easiest way to do this is to fill a series of dates in Excel and to copy/paste the dates into the Access table.

    Now create a query based on this table and on qryRemainingCalDaysByJob.
    Don't join the tables.
    Add JobNumber from qryRemainingCalDaysByJob and TheDate from the table to the query grid.
    Set the criteria for TheDate to

    >=[Today] And <[Today]+[RemainingDays]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •