Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Aug 2006
    Location
    Belfast, Antrim, United Kingdom
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Due date in access (2003)

    Hi There

    I am a fairly new user and use Access to contain data for printing my invoices. I have the code to insert the date the invoice is raised "Date()" in a date of invoice field. Is there a simple code to add 30 days to this date and display the result as a date?

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

    Re: Due date in access (2003)

    Welcome to Woody's Lounge!

    Yes, that is simple: put a text box on your form or report and set its Control Source to

    =[InvoiceDate]+30

    or

    =DateAdd("d',30,[InvoiceDate])

    where InvoiceDate is the name of the field you have filled. Set the Format property of the text box to the date format you prefer.

  3. #3
    New Lounger
    Join Date
    Aug 2006
    Location
    Belfast, Antrim, United Kingdom
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Due date in access (2003)

    Many Many thanks for this. I wish I had started here.

  4. #4
    New Lounger
    Join Date
    Aug 2006
    Location
    Belfast, Antrim, United Kingdom
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Due date in access (2003)

    Still not there.
    I use a template in Word as my invoice, mail merging the data from my Access database. I obtain the Invoice date by setting the default value of the field Name Inv Date to the expression- Date()
    What I was trying to do is set a default value of 30 days hence against the field name Due Date. I tried putting your code against the Default value of Due date but it returned an error.

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

    Re: Due date in access (2003)

    You can set the Default Value of the Due Date field to =Date()+30 or to =DateAdd(30,"d",Date())
    You cannot refer to another field in the Default Value property.

  6. #6
    New Lounger
    Join Date
    Aug 2006
    Location
    Belfast, Antrim, United Kingdom
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Due date in access (2003)

    Thats it exactly what I have been searching for. Is there a book that lists theses things in a simple catalogue that you know off. I don't have the ime to learn the why's and wherefores I just whant a simple answer bit like a telephone number.

    Thanks anyway sorry to take so long in gettiing back to you, been trying to earn the money to have to write the invoice etc etc.

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

    Re: Due date in access (2003)

    I don't know if such a book exists, somehow I doubt it. But perhaps someone else will have a suggestion.
    Feel free to ask here in the meantime.

Posting Permissions

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