Me.Filter another date issue

ppataki

Registered User.
Local time
Yesterday, 21:25
Joined
Sep 5, 2008
Messages
267
Dear All,

I have a form where I used the below filter in the AfterUpdate event of me.celev_combo:
Code:
Me.Filter = "Year([tbl_aktivitas].[Akt_datum]) = " & Me.celev_combo
Me.FilterOn = True
and I got the following error:
Enter parameter value
tbl_aktivitas.Akt_datum
(me.celev_combo is a numeric combo box, containing years like 2011, 2012, etc)

Could you please advise?
Many thanks in advance
 
Try:
Code:
Me.Filter = "Year([Akt_datum]) = " & Me.celev_combo
 
Now I get error:
Enter parameter value
Akt_datum
 
Akt_datum is not in your form's Record Source. Check the spelling or include it in the Record Source.
 
OK, got it
Now I have put the combo box on the subform and it works that way!
(it just would have been nicer to have it on the main form, but anyway)
Many thanks!!
 
Me.Filter is a command to filter the record source of your current form (or the calling form). If you want to filter another form you point to the form. You can have the combo box wherever you wish - main form or subform.
 

Users who are viewing this thread

Back
Top Bottom