Use field value as the year in a date

Discussion in 'Other Software' started by Eveline VdB, Mar 11, 2010.

  1. Eveline VdB

    Eveline VdB

    Joined:
    Mar 11, 2010
    Likes Received:
    0
    I work with MS Access 2003.

    I am creating a query to show all contracts set up in a certain year that have been cancelled in that specific year. This "Cancelled" field is not a yes/no field, but includes the date on which it has been cancelled (always starting 31/12/YYYY).

    First, to show me the contracts set up in a certain year (say 2008) , i created a parameter under the "Contract Year" field, asking which year you want to see (in this case 2008).

    I wish to add a criteria that then shows cancelled contracts at the end of that specific year, so 31/12/2008. So whether it is "2008" or another year is dependent on the value in the "Contract Year" field.

    I tried the following as criteria for the Column "Cancelled":

    #31/12/[Contract Year]#

    to try and have it take the year mentioned in that field.
    But it doesn't work. Access sees is as a second parameter, instead of a field name.
    I tried adding LIKE to it and the &-sign, still no luck.

    Is it possible to use a field name in a date criteria and if so, how could i do it?

    Thank you very much in advance for your help.
     
    Eveline VdB, Mar 11, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. exsavior10
    Replies:
    0
    Views:
    859
    exsavior10
    Mar 5, 2011
  2. OLG
    Replies:
    0
    Views:
    1,409
  3. saraho1703

    highlighting dates past a year

    saraho1703, May 31, 2011, in forum: Other Software
    Replies:
    5
    Views:
    800
    Sifou
    Jun 3, 2011
  4. Kellyzeroes
    Replies:
    0
    Views:
    1,160
    Kellyzeroes
    Jul 13, 2011
  5. actuarygirl

    Access ACCESS group by date, month, and sum value.

    actuarygirl, Jun 21, 2012, in forum: Microsoft Office
    Replies:
    2
    Views:
    1,066
    actuarygirl
    Jun 21, 2012
  6. Vanya

    Access Multiple value field Access 2007

    Vanya, Jul 13, 2012, in forum: Microsoft Office
    Replies:
    2
    Views:
    689
    Vanya
    Jul 17, 2012
  7. Johnnyspa
    Replies:
    2
    Views:
    1,113
    Johnnyspa
    Oct 30, 2012
  8. chip01051959
    Replies:
    0
    Views:
    934
    chip01051959
    Jul 18, 2014
Loading...