• Month parameter (Access2003)

    • This topic has 3 replies, 2 voices, and was last updated 17 years ago.
    Author
    Topic
    #451688

    Hi!

    I have to be able to select month,year and if it is a MAY I ned to run my query for the whole month of MAy,2008.

    I am going to use Parameters Forms!FormName!txtDate for each of the few querie that are involved.

    I can’t figure out pretty way to have May, 2008 selected from the drop down or typed into a text box and have query know it is from 1/5/2008 to 5/31/2008.

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1112633

      You could add two calculated columns to your query:

      M: Month([DateField])

      and

      Y: Year([DateField])

      where DateField is the field you want to filter on, and set the criteria to Month(Forms!FormName!txtDate) and Year(Forms!FormName!txtDate), respectively.

      • #1112643

        How do I populate Year column?

        I have a Date column already that has date in a format 1/1/2005 to today’s date.

        So I can let them pick dates from the combobox in fomat like May, 2008 but it will suppose to correspont to my Date field and translate from 5/1/2008 to 5/31/2008

    Viewing 0 reply threads
    Reply To: Month parameter (Access2003)

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

    Your information: