Results 1 to 6 of 6
  1. #1
    txacoli is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2010
    Posts
    19

    Newbie - can't work out how to generate one date from another date in the DB

    Hi...I am teaching myself Access at the moment and it's a slow process. I am a true newbie at the tender age of 54 (having to retrain due to unemployment!) and have started a small, home business. I don't understand a lot about Access beyond creating a simple database at the moment, so please be gentle with me when you start speaking technical. I don't like asking people to show me what to do as I like to learn for myself, but I'm really struggling with this one and I need some help please.



    I have a date in my DB with the title RECEIVED. I have 30 days to respond to the receipt of this application and want to work out when this 30 days is up so that I can prioritise and I would like that date to show up in my table. I would also like use both dates in a mailmerge letter for when I write back to the applicant.

    I'm sure the answer should be reasonably straightforward, but I've literally spent hours on this and am not getting anywhere. If someone could help me out and talk me through it in a response, I'll be eternally grateful. Again, please be aware that technical speak is not my strong point at the moment because I'm learning. Computers are new to me beyond basic emailing, Word, Excel and internet use, but I'm determined to crack this.

    Thank you for your help in advance.

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Look up DateAdd function, you can add time values as well as days and years to a date including previous dates where you would do -30 if you wanted the date 30 days prior to a given date.

    Me.NewDate = DateAdd ("d", 30, [YourDate])


    Also when dealing with dates, there is also DatePart to pick out a specific value of a date(say you only want the month value) and DateDiff which gives you the number of time/date values between 2 dates. Again you can look these up online for more info and examples.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,933
    you would use the dateadd function to calculate a date 30 days from a given date e.g.

    dateadd("d",30,received)

    use it in a query or as a calculated value to an unbound control. I would not use it in a table

  4. #4
    txacoli is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2010
    Posts
    19
    Thank you guys. I've seen where I was going wrong now. I was trying to create the calculation within the table and was using the table for the mailmerge. I've now created a query for the calculation and used all my fields within that query. I can mailmerge from the new query and it pulls through all the information I needed. I know it's a simple thing but one I've been trying to do for so long. You would be surprised just how little information there is for newbies like me on things like this - there is a tendency to think that all Access users are experts and it goes over my head.
    Thank you both once again. You can't believe how happy I am. It's only a small change, but such a niggling one where I've had to manually put in the date on my letter to the client. Now I can generate it automatically.

  5. #5
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Awesome!! Yes Access can do a lot of things for you. And queries are the real power of Access. Good luck on your project.

  6. #6
    txacoli is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2010
    Posts
    19
    Thanks Bulzie. It’s people like you and Ajax who are a massive help to people like me. I sometimes think that the easier queries in this kind of forum are overlooked because they are so simple, but this one small piece of help has boosted my self-confidence so much to push on and learn more. I can’t thank you both enough.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-02-2015, 07:25 AM
  2. Replies: 6
    Last Post: 02-25-2014, 07:44 PM
  3. Between [start date] and [end date] won't work
    By BCJourney in forum Queries
    Replies: 7
    Last Post: 01-17-2013, 10:01 AM
  4. Replies: 12
    Last Post: 04-26-2012, 04:01 AM
  5. iif statement to generate date
    By Theremin_Ohio in forum Access
    Replies: 8
    Last Post: 05-31-2011, 07:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums