• Updating a year (Access 2002)

    Author
    Topic
    #363952

    How do you update just the year value? I have a tblCompanyFacts which has just 1 record which for one thing holds the fiscal year start and ending dates (two different fields). I want to be able to automatically update these values with a button click. Can anyone direct me in the right direction on how to do the update. Thanks Fay.

    Viewing 1 reply thread
    Author
    Replies
    • #557110

      Use the DateAdd function either in an update query or in code. A typical DateAdd to change the year would be something like this:

      DateAdd(“yyyy”,1,[StartDate])

      • #557152

        Thank you Charlotte and Ricky. It is a major help when you know what the words are that you need to lookup.

        Thank you for saving me a lot of time. Fay

        • #557158

          LOL …. It is almost as hard to learn how to use Access Help as it is to learn how to write code in Access.

          You are welcome for the help I’ve given ….. smile

          RDH

    • #557109

      Not sure what you are doing … I assume you want to add a year to it.

      You can use an Update query in conjuction with the DateAdd() function to do what you ask.
      You can search Access Help files on “DateAdd” to get the needed syntax.

      HTH
      RDH

    Viewing 1 reply thread
    Reply To: Updating a year (Access 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: