Ive been looking all over trying to figure out how to have a select all at the top of a combo box.
What I have is a combobox Combo5 with a row source of
SELECT artist_id, artist_name FROM tblArtists ORDER BY artist_name;
A text box with a row source of
SELECT [tblTracks].title, [tblTracks].length, [tblGenres].music_genre_name, tblBitrates.Bitrate, [tblTracks].date_of_creation, [tblArtists].artist_name FROM tblBitrates INNER JOIN (tblGenres INNER JOIN (tblArtists INNER JOIN tblTracks ON [tblArtists].artist_id=[tblTracks].artist_id) ON [tblGenres].music_genre_id=[tblTracks].music_genre_id) ON tblBitrates.bitrate_id=[tblTracks].bitrate_id WHERE (((tblArtists.artist_id)=Forms![frmSearch]!Combo5)) ORDER BY [tblTracks].title;
And VBA code in the After update of the combo box
Private Sub Combo5_AfterUpdate()
What I would like to have happen is a select all at the top of the combo box that is the default selection, and when its selected all records from the query are show.
Ive tried a bunch of Unions and such that I have seen online and cant get it to work.
SELECT artist_id as filter, artist_name FROM tblArtists UNION SELECT "*" As Filter ," All" As artist_name FROM tblArtists ORDER BY artist_name;
I had tried this before but it didnt work.
What I did was add Like to my text box select criteria
SELECT tblTracks.title, tblTracks.length, tblGenres.music_genre_name, tblBitrates.Bitrate, tblTracks.date_of_creation, tblArtists.artist_name FROM tblBitrates INNER JOIN (tblGenres INNER JOIN (tblArtists INNER JOIN tblTracks ON tblArtists.artist_id=tblTracks.artist_id) ON tblGenres.music_genre_id=tblTracks.music_genre_id) ON tblBitrates.bitrate_id=tblTracks.bitrate_id WHERE (((tblArtists.artist_id) Like [Forms]![frmSearch]![cmbArtist])) ORDER BY tblTracks.title;
Just figured I would post this in case anyone else has this same problem..