Records not found on query

G

Guest

Last week data on people attending a class was entered for classes on 5/23,
5/24, 5/26 and 5/27. The data is in the table. The query will pull the
records for 5/23, 5/24 and 5/27 (by date), but not for 5/26. The date
"looks" the same in the table, i.e, 5/24/2005, 5/26/2005 (it is formatted as
Short Date). The autonumber (primary key) is sequencial within a date set,
although the data for 5/26 was entered between 5/23 and 5/24.

Recordsets pulled by the same query based on the individual dates are
correct for 5/23, 5/24, & 5/27, but has a recordcount for 5/26 of 0 records
(should be 13). When I run a query for the entire database, it is 17 records
short (5/26 has 13 and 5/27 had 4 records), so whatever is causing a query to
not pull 5/26 is stopping a loading of the table (based on a query which also
pulls the name of the client from another table) of anything later than 5/24.

I have run the repair function, same thing happens.

Any comments or ideas?

John H W
 
G

Guest

I found out the reason. For some reason the date AND TIME was being recorded
in the record (all the field criteria (table and form) is defined as short
date). When I deleted the time component, all queries worked.

Now I just have to figure out how the full date and time was being saved
when all the parameters in the table field and form field is defined as short
date.

Any comments?
 
V

Van T. Dinh

How did you assigned values for this Field?

If you use the Default Now() or assigning it by code using Now(), you will
almost always get the non-zero time component.

The Format only affects how the value is dispaly, not what value is to be
stored in the Table.

--
HTH
Van T. Dinh
MVP (Access)
 

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