MS Access Subform Showing Limited Query Results

20 Views Asked by At

I have a table, query, main form, sub form.

The table houses information, the query is designed to return every record in the table, the main form is designed to scroll through each record on the table, the subform is designed to display the query results inside the form.

The idea is that the subform will show a "summary" of everything in the table while the main form will allow you to scroll through and edit individual records.

I have a table called DispatchNote with the following information:

NoteID NoteDate Note
1 4/11/23 Test 1
2 4/10/23 Test 2
.
.
.
5 4/05/23 Test 5

I have created a main form called NotesForm that scrolls through individual records in "DispatchNote". This form behaves as expected and scrolls through records 1-5, one at a time.

I have created a query called NotesQuery that returns every record in the table. This query behaves as expected when run on its own. It shows records 1-5 sorted by date.

SELECT DispatchNote.NoteID, DispatchNote.NoteDate, DispatchNote.Note
FROM Note
ORDER BY DispatchNote.NoteDate DESC;

I have created a subform called NotesSubform that displays the results of NotesQuery as a datasheet. When I open the subform on its own it behaves as expected - it displays every single record in the "Notes" table.

When I add the subform into the main form - the subform no longer acts as expected. It limits the query results exclusively to the current record open in the main form rather than displaying all the results. I.e. if record 2 is open the subform will only display record 2 (rather than 1-5 as I want).

I'm sure there is something stupid I'm missing but I cannot seem to figure out why it is doing so.

Thanks in advance.

0

There are 0 best solutions below