I wanted to do so that in the combo box only two types of books „Access“ and „All books“ were displayed and transferred to the subordinate form. But I didn't even know how to make "All books..." In Row Source I tried to prescribe such options:
SELECT DISTINCT Books.[Book type] FROM Books UNION SELECT "All books" from Books GROUP BY [Books].[Book type];
SELECT [Book type] AS Filter, [Book type] FROM [Books] UNION SELECT 'All books' AS Filter, "All" AS [Book type] FROM [Books];
SELECT Books.[Book type] FROM [Books] UNION SELECT "All books" FROM Books GROUP BY [Books].[Book type];
I tried it and so:
Row Source Type: ValueList
Row Source: Access;All books
and I added the Event:
Private Sub BookType_AfterUpdate()
If Me.BookType = "All books" Then
strFilter = "*"
Else
strFilter = "'" & Me.BookType & "'"
End If
End Sub
But nothing meaningful happened. Searched the entire Internet, also found nothing...