Results 1 to 4 of 4
  1. #1
    Bentley is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2016
    Posts
    50

    DateAdd


    Hello,

    I am trying to use the date add to calculate the expiry date of orientations. I have a field labeled 'OrientationTaken' and another 'OrientationEpry'. I am trying to create the expression in the query that looks like this DateAdd('YYYY',3,[orientationtaken]). however I get a parameter box to enter the date when I run the query. I also have to type the field in as it isn't being recognized when building the expression (hope that makes sense). Any ideas as to what I am doing wrong?

    Thanks,

    Ben

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It sounds like the table that you want to apply this to isn't part of your query (or perhaps you have a typo?).

    Be sure to select the table in this query, and to be sure, add the OrientationTaken field by double-clicking on it.

    If it still does not, create a simple Select Query where you simply add this OrientationTaken field to it, change toe SQL View, and copy and paste your SQL code here.

  3. #3
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Isn't it "yyyy"


    Sent from my iPhone using Tapatalk

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Isn't it "yyyy"
    I saw that too, but tested 'YYYY' and that also seemed to work.

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

Similar Threads

  1. DateAdd Function?
    By zburns in forum Reports
    Replies: 7
    Last Post: 06-23-2015, 01:55 PM
  2. the DateAdd
    By azhar2006 in forum Queries
    Replies: 1
    Last Post: 04-20-2014, 03:18 PM
  3. DateAdd Error
    By TimMoffy in forum Programming
    Replies: 2
    Last Post: 04-17-2013, 10:13 AM
  4. DateAdd()
    By cbrsix in forum Programming
    Replies: 3
    Last Post: 11-22-2011, 02:20 PM
  5. dateadd help
    By dubsdj in forum Queries
    Replies: 3
    Last Post: 03-03-2011, 07:22 PM

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