date query

Lifeseeker

Registered User.
Local time
Today, 01:42
Joined
Mar 18, 2011
Messages
273
Hi,

I'm making a reports that pull records previously(say...in the last 1000 days) I have also attached a test database.

I am having trouble with the query. The following codes doesn't seem to accommodate the situation where a cell with empty date is there for a record, as you can see in the database. Shouldn't the results don't include the record with empty date?

>[my combo box goes here] - 1000 is the parameter.

any help is much appreciated.
 

Attachments

Hi,

I'm making a reports that pull records previously(say...in the last 1000 days) I have also attached a test database.

I am having trouble with the query. The following codes doesn't seem to accommodate the situation where a cell with empty date is there for a record, as you can see in the database. Shouldn't the results don't include the record with empty date?

>[my combo box goes here] - 1000 is the parameter.

any help is much appreciated.

In your query 1 you have Is Null this should be Is Not Null, that will resolve that part.
 
In your query 1 you have Is Null this should be Is Not Null, that will resolve that part.


Hi,

sorry I wasn't clear in my post early.I meant that when I ran the query, it still shows the records that contains an empty date, and this is not desirable.

However, I seem to have fixed the problem by changing "is not null" into "is null" in the OR criteria. It works this way.

If you have time, would you guys be able to help me on this situation where there are two date-based unbound textboxes on the form?

The problem I have right now is that....as you can see in the test database attached.....if you leave one of the textboxes empty in the form, then the query won't return the right results. it just returns no records even tho the first criteria(first unbound textbox) is passing the right date parameter.

Do you guy sknow how to fix this?

Thank you all
 

Attachments

Users who are viewing this thread

Back
Top Bottom