Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2012
    Posts
    4

    Unanswered: Creating an END DATE Calculator in Access Forms

    Hello All!

    I just need some help trying to create an End Date Calculator with the following formula: Orders Start Date (which is a regular Date) + Orders Length (which is the number of days). It works in my query but just couldn't figure out the right expression for the forms.

    Thanks a whole bunch!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    ...It works in my query but just couldn't figure out the right expression for the forms.
    If it works in your Query, to use it in your Form, base the Form on the Query! On the Form, set the Control Source of your End Date Control to the calculated Field in the Query.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Jan 2012
    Posts
    4

    Red face

    I did tried it as my control source but it's giving me an error. Not sure what I am doing wrong...

  5. #5
    Join Date
    Jan 2012
    Posts
    4
    Quote Originally Posted by gvee View Post
    I tried this one too but I'm probably writing it wrong. I am a novice Access user and just learning all the codes on my own.

    I created the text box for the end date and inputted the expression in my control source:
    = DateAdd([Orders Lgth], [Order Start Dt])

    The code didn't work for me. The orders length represents how many days I would like to add to the orders start date which will be the End date.

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by tumtum123 View Post

    ...I created the text box for the end date and inputted the expression in my control source:
    = DateAdd([Orders Lgth], [Order Start Dt])
    You've omitted the 'interval' argument which tells Access how many 'what' to add. For days "d" is the correct interval:

    = DateAdd("d", [Orders Lgth], [Order Start Dt])

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Join Date
    Jan 2012
    Posts
    4

    Unhappy

    Quote Originally Posted by Missinglinq View Post
    You've omitted the 'interval' argument which tells Access how many 'what' to add. For days "d" is the correct interval:

    = DateAdd("d", [Orders Lgth], [Order Start Dt])

    Linq ;0)>
    Ok, I did wrote the formula exactly as written but it is giving me the #Error. I had tried it different ways, used ("d", ([orders lgth]), ([order start dt])) and even used just the " ". The form is not letting me used the Orders End from my End date Calculator query either. It is completely frustrating knowing that I was able to do it in query but couldn't use it in the form...

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I don't know what else to tell you except to Zip the file up and attach it to a post here. If it's version 2003 or older I can look at it, if it's 2007/2010 hopefully someone else can look at it and see what's going on.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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