Show null values in Query


Joined
Feb 18, 2014
Messages
1
Reaction score
0
I have two unrelated tables -

EventList: This has two fields: a specific date, and an event description.

Period table: This has two date fields (start and finish) and a period description.

The aim is to show all the events AND the period that the event falls within.

The following SQL works well for listing all the events and the period:

SELECT EventList.EventDate, EventList.EventDetail, Period.Period, Period.Start, Period.Finish
FROM EventList, Period
WHERE (((EventList.EventDate) Between [Period].[Start] And [Period].[Finish]));

However, there are several events that have no date (i.e. an unknow date). and therefore the query does not include them. I'd like the query to show all events regardless of whether they have a date.

If I add a "or Is Null" to the EventDate field, I get all the events with dates, and duplicate entries for each period.

Is there any way of listing all the events that have dates, and only one of each entry without dates?

Cheers
Peat
 
Ad

Advertisements


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

Similar Threads

Query by Form shows Null or Is Not Null 3
Show textbow if value is Not Null 1
Null Value 3
Null Value 3
Null value 2
List Box Paramater query with Null value 3
Calculation with a null value 1
Null value in table 1

Top