Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parameter for Date Part (Access 2003/2007)

    I have a drop down for a Start Date entry based on the parameter query given here: [Enter Start Date]
    My question is:
    I know how to use the ampersand and wild cards to allow partial or incomplete use of text in a parameter (eg. Like"*"&[Enter Name]&"*") however....
    How do I make the parameter accept someone typing in a month like 03 or a day like 14 or a year like 2005? Everything I've tried seems to grab for example the 03 whether it is a day or a given month. Somehow I've got to tell it that this is going to be a day, a year or a month I am entering so it can pull the correct part and give me the correct result.
    Any clues?
    Thank you so much for any feedback
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

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

    Re: Parameter for Date Part (Access 2003/2007)

    You could use

    Like [Enter Start Date]

    If you want to specify only the year 2005, enter */2005 or *05 in the parameter box.
    If you want to specify March 2005, enter 03/*/2005 or 03/*/05 in the parameter box.
    If you want to specify the first of any month in 2005, enter */01/2005 or */01/05 in the parameter box.

    This is dependent on the user's date format. If it is set to a European format such as dd/mm/yyyy or yyyy.mm.dd it'll work differently.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameter for Date Part (Access 2003/2007)

    HansV
    This works for me...Just going to have to add a brief yet detailed explanation within the main form when they use the button to run this query...to check the date format on their computer first, and what the wildcards are for...as they are not going to know unless I do.
    This will work...it is a solution..
    Thanks,
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

Posting Permissions

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