Corticus
Well-known Member
- Joined
- Apr 30, 2002
- Messages
- 1,579
Hi all,
This is a pretty generic problem I've had before and I've never really gotten a good explanation, just lots of workarounds...
Simple Query:
The problem occurs when I have any criteria for a date. As long as there is only one criteria, the query returns the correct records. However, if I add additional criteria, as shown above, the query doesn't even acknowledge the additional criteria. Right now I am making one query to eliminate date_of_birth before 1940, and then another query that looks at the first query, and applies additional criteria to it, which works.
In addition, as long as the criteria aren't dates, I can use multiple conditions in one query. Once a date criteria has been added, however, no other criteria will affect the query. You can even put nonsense in the criteria and the query doesn't even seem to notice that its there.
Kind of strange, I hope I explained it well...
Thanks,
Corticus
This message was edited by Corticus on 2002-12-30 17:04
This is a pretty generic problem I've had before and I've never really gotten a good explanation, just lots of workarounds...
Simple Query:
Book1 | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Field | Name | Date_of_Birth | Service_Provided | Age:Year([Service_Provided]-[Date_of_Birth])-1900 | ||
2 | Table | TblClient | TblClient | TblServices | |||
3 | Criteria | >#1/1/1940# | >#1/1/2001# | <"60" | |||
Sheet1 |
The problem occurs when I have any criteria for a date. As long as there is only one criteria, the query returns the correct records. However, if I add additional criteria, as shown above, the query doesn't even acknowledge the additional criteria. Right now I am making one query to eliminate date_of_birth before 1940, and then another query that looks at the first query, and applies additional criteria to it, which works.
In addition, as long as the criteria aren't dates, I can use multiple conditions in one query. Once a date criteria has been added, however, no other criteria will affect the query. You can even put nonsense in the criteria and the query doesn't even seem to notice that its there.
Kind of strange, I hope I explained it well...
Thanks,
Corticus
This message was edited by Corticus on 2002-12-30 17:04