Unmatched Query

D

DS

I have an unmatched Query that should be returning a result but doesn't any
help is appreciated.
Thanks
DS

SELECT tblMenuSchedule.SchedTerminalID, tblMenuSchedule.SchedMenuID,
tblMenuSchedule.SchedStartDay
FROM tblMenuSchedule LEFT JOIN Days ON tblMenuSchedule.SchedStartDay =
Days.DayID
WHERE (((tblMenuSchedule.SchedTerminalID)=[forms]![frmMM]![TxtID]) AND
((tblMenuSchedule.SchedMenuID)=[Forms]![frmMM]![TxtMenuID]) AND
((Days.DayID) Is Null));
 
D

DS

Perhaps more info! I have a list box that shows days of the week, basically
I want that listbox to show the days of the week that are not in the
tblMenuSchedule with a particular menu. So if...
Lunch Mon
Lunch Tue
Lunch Wed

Then the days listbox would show...
Sun
Thur
Fri
Sat

Thanks
DS
 
D

Dale Fye

is the DayID field numeric or Date/Time?

Have you tried adding the DayID field to the select clause, then removing
all of the criteria? What results do you get when you try this?

Dale
 
D

DS

OK This works. I had them reversed sort of.
This is the QMenDaySort:
SELECT tblMenuSchedule.SchedTerminalID, tblMenuSchedule.SchedStartDay,
tblMenuSchedule.SchedMenuID
FROM tblMenuSchedule
WHERE
(((tblMenuSchedule.SchedTerminalID)=[Forms]![frmMenuCreatorPasteDay]![TxtID])
AND ((tblMenuSchedule.SchedMenuID)=[Forms]![frmMenuCreator]![TxtMenuID]));


This is the final statement:
SELECT Days.DayID, Days.DayName, QMenDaySort.SchedStartDay
FROM Days LEFT JOIN QMenDaySort ON Days.DayID = QMenDaySort.SchedStartDay
WHERE (((QMenDaySort.SchedStartDay) Is Null));

But how do I do this without a Query in there. I want just SQL.
Thanks
DS

PD the DayID field is a number 1 to 7
 

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