Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jul 2007
    Location
    North Carolina, USA
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Expression Help: Workday query (Access 2003)

    Expr: [ProjectDate]+90 Workdays
    I know this is not right, but I am trying to add a column in my query that will calculate the estimated date for a project using the above. I found resources for # of days ahead or behind but not specifically WORKDAYS. Thanks for the help.

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

    Re: Expression Help: Workday query (Access 2003)

    You need some custom VBA functions for this. See Doing WorkDay Math in VBA on the Access Web.

  3. #3
    Star Lounger
    Join Date
    Jul 2007
    Location
    North Carolina, USA
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Expression Help: Workday query (Access 2003)

    Hans,

    I am not very good with VB, I looked over what you sent me and I think I need a little more direction. Can I use this in the Query or do I have to put it somewhere else in my database to be able to use it more than once?

    Thanks for your help.

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

    Re: Expression Help: Workday query (Access 2003)

    First, activate the Modules section of the database window.
    Click New to create a blank new module.
    Copy / paste the code from the web page I referred to (from ' ********* Code Start ************** to ' ********* Code End **************) into the module.
    Press Alt+F4 to close the Visual Basic Editor and to return to Access. You can now use the code in queries and on forms and reports.
    For example you could create a calculated column in a query:

    NextDate: dhAddWorkDaysA(90,[ProjectDate])

    This will display the date 90 workdays after ProjectDate.

  5. #5
    Star Lounger
    Join Date
    Jul 2007
    Location
    North Carolina, USA
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Expression Help: Workday query (Access 2003)

    Thanks Hans, you are such a great source for the hard stuff.

Posting Permissions

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