P
Peter Scott
Hello. I have a table Schedule, with columns RoomID, TimeSlotID, and
SessionID. I made a form with a list box for selecting RoomID, and a
subform showing TimeSlotID and SessionID. So far so good. But the
ordering of the records in the subform is not what I want.
I found out how to enable OrderBy for the subform, but I do not want to
sort by TimeSlotID. I have another table, TimeSlots, with columns ID and
SortingOrder. TimeSlots.ID and Schedule.TimeSlotID are related. I want
to sort by TimeSlots.SortingOrder. But I can't figure out how. The
OrderBy property seems to require an expression and not a query. I was
able to replace the record source of the subform with a query that joined
Schedule and TimeSlots, and then I got the records sorted, only problem
was, I couldn't change any of them because my source was a query and not
a table.
I want my subform to sort on (SELECT TimeSlots.SortingOrder FROM TimeSlots
WHERE TimeSlots.ID = <subform>.TimeSlotID), but I can't figure out how.
Any thoughts?
SessionID. I made a form with a list box for selecting RoomID, and a
subform showing TimeSlotID and SessionID. So far so good. But the
ordering of the records in the subform is not what I want.
I found out how to enable OrderBy for the subform, but I do not want to
sort by TimeSlotID. I have another table, TimeSlots, with columns ID and
SortingOrder. TimeSlots.ID and Schedule.TimeSlotID are related. I want
to sort by TimeSlots.SortingOrder. But I can't figure out how. The
OrderBy property seems to require an expression and not a query. I was
able to replace the record source of the subform with a query that joined
Schedule and TimeSlots, and then I got the records sorted, only problem
was, I couldn't change any of them because my source was a query and not
a table.
I want my subform to sort on (SELECT TimeSlots.SortingOrder FROM TimeSlots
WHERE TimeSlots.ID = <subform>.TimeSlotID), but I can't figure out how.
Any thoughts?