a problem filtering data

  • Thread starter Thread starter David Garcia
  • Start date Start date
D

David Garcia

Hi

I have a problem with an Access Database, I want to make a
filter that filter a subform from a combobox choice, I
write a code that filter but when I put the combobox value
a Dialog appears (not an error dialog) "put the value of
parameter" and, when I put a valid dialog my filter works
well but I don't want to this dialog appear, I want that
my code just filter from the combobox choice and I dont
want to type the value on combobox, plz somebody help .

here's my code:

Private Sub cboMes_AfterUpdate()
sfmHoja.Form.filter = "[Mes]=" & cboMes.Text
sfmHoja.Form.FilterOn = True
End Sub
 
change
sfmHoja.Form.filter = "[Mes]=" & cboMes.Text
to
sfmHoja.Form.filter = "[Mes]=" & cboMes
 
Back
Top