Filter Form with mulit select list

AgDawg

Registered User.
Local time
Today, 13:12
Joined
Oct 12, 2012
Messages
24
I have searched around but haven't found really what I am looking for. I have a simple form with a list of a field that contains years. One row item can contain multiple years. So I have another form that contains some basic information such as name and year. Currently the year field on the form will show 2012, 2013 if those two are chosen.

I need a list box up top where if I select 2012 it will filter for all records where 2012 is chosen. I then need another command button to export to excel if that's possible.

Any help is appreciated!
 
try this code:

Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[yourfieldnamethatcontainsyears]=" & str(Nz(Me![yourcomboboxname], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 

Users who are viewing this thread

Back
Top Bottom