Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Dec 2002
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Iím trying to make a query that will ask for the Last & First Names and the DOB. How would you write the DOB one?

    Like "*" & [Enter LAST NAME:] & "*"
    Like "*" & [Enter FIRST NAME:] & "*"
    What do I put in the DOB field?

    Microsoft Access 2003

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    [quote name='buckshot' post='790595' date='25-Aug-2009 10:20']Iím trying to make a query that will ask for the Last & First Names and the DOB. How would you write the DOB one?

    Like "*" & [Enter LAST NAME:] & "*"
    Like "*" & [Enter FIRST NAME:] & "*"
    What do I put in the DOB field?

    Microsoft Access 2003[/quote]
    Exactly what are you looking for? People born on a specific date (including year) or on a specific Month & Day (regardless of year)? Or do you want people born between 2 dates (including year) or between 2 Month/Day entries (regardless of year).
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Dec 2002
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm looking for people born on a specific date (including Year) In the database the year maybe wrote 01/01/1966 or 01/01/66

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    It depends on how much flexibility you want to give the user on the birthdate. For example you might just include the year, in which case your query should have the expression
    YearBorn: Year(dtBirthDate)
    as one of the columns in the the query, and you would put
    [Enter Year Born:]
    as the criterai for that column. You could do the same for the month and the day if you choose to, but then you might as well ask for the full birthdate. You could also do an expression such as
    Between [Enter earliest BirthDate:] And [Enter latest BirthDate:]
    Wendell

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts
    [quote name='buckshot' post='790598' date='25-Aug-2009 11:01']I'm looking for people born on a specific date (including Year) In the database the year maybe wrote 01/01/1966 or 01/01/66[/quote]
    If you are looking for people born on a specific date, your criteria could be like this:

    =cdate([Enter birthdate (mm/dd/yy)])
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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