Simple Query/Date issue (I Hope)

R

Randy

There is probably a simple answer to this. I have a query with several
fields of: DateIssued, EmployeeID, Fees, etc. My table has an imput mask
for the dateIssued of 99/99/00; My form allows me to enter 1/3/05 with no
problem. The table shows 1/3/2005. My query has a criteria of : Like
[Please Enter Date] When I run my query I must enter all 4 digits of the
yesr for it to fire. If I enter 1/3/05 I get a blank result...Any
ideas..Thanks Randy
 
J

John Spencer (MVP)

Don't use like, use =.

If you use Like, Access helpfully changes the date into a string. When it does
so, it is evidently making the string show a 4-digit year. It makes the change
because LIKE is designed to work with strings, not dates or numbers.
 
R

Randy

That was it. Thanks John
John Spencer (MVP) said:
Don't use like, use =.

If you use Like, Access helpfully changes the date into a string. When it
does
so, it is evidently making the string show a 4-digit year. It makes the
change
because LIKE is designed to work with strings, not dates or numbers.
There is probably a simple answer to this. I have a query with several
fields of: DateIssued, EmployeeID, Fees, etc. My table has an imput
mask
for the dateIssued of 99/99/00; My form allows me to enter 1/3/05 with
no
problem. The table shows 1/3/2005. My query has a criteria of : Like
[Please Enter Date] When I run my query I must enter all 4 digits of
the
yesr for it to fire. If I enter 1/3/05 I get a blank result...Any
ideas..Thanks Randy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top