Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Month parameter (Access2003)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Month parameter (Access2003)

    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.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Month parameter (Access2003)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Month parameter (Access2003)

    Please read my previous reply again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •