I have a listbox that gets its rowsource from a query. I want to eliminate the query and and just use SQL how would I write this?
This is the way it is now...
With Me.ListDay
.RowSource = "SELECT Days.DayID, Days.DayName, QMenDaySort.SchedStartDay " & _
"FROM Days LEFT JOIN QMenDaySort ON Days.DayID = QMenDaySort.SchedStartDay " & _
"WHERE (((QMenDaySort.SchedStartDay) Is Null)) " & _
"ORDER BY Days.DayID;"
.ColumnCount = 3
.ColumnWidths = "0 in;2 in;0 in"
.Requery
End With
Here is the SQL statement of that same Query....
SELECT tblMenuSchedule.SchedStartDay, tblMenuSchedule.SchedMenuID, tblMenuSchedule.SchedTerminalID
FROM tblMenuSchedule
WHERE (((tblMenuSchedule.SchedMenuID)=[Forms]![frmMenuCreator]![TxtMenuID]) AND ((tblMenuSchedule.SchedTerminalID)=[Forms]![frmMenuCreatorPasteDayMenu]![TxtID]));
Thanks
DS