Jump to content

Recommended Posts

Posted

Im a noob at SQL and Microsoft Access. Only been using online tutorials for past week.

I am using DD-MM-YYYY instead of the american MM-DD-YYYY format in my data base.

What im trying to do is to write a query to only display individuals in my data base that are aged 20-25 on a specified date (6/6/2002)

athletetableyh1.jpg

sqlquerygg6.jpg

'Data type mismatch in criteria expression' is the error i keep getting and i dont understand why.

Is it that the query would only work when the date format is in MM-DD-YYYY? I already set the 'dOB' field to date/time format and it has accepted the DD-MM-YYYY format so i doubt it.

Can anyone help?

  • 1 month later...

Posted

The correct criteria expression for dates is:

Between #06/06/1977# And #06/06/1982#

BTW, all date/time formats are readable by MS Access,

no matter how they look, as long as they are correct formats.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...