Access Filter VBA

Posted by user569709 on Stack Overflow See other posts from Stack Overflow or by user569709
Published on 2011-01-10T10:48:29Z Indexed on 2011/01/15 21:53 UTC
Read the original article Hit count: 264

Filed under:
|
|

Hi,

I'm trying to use a filter in vba like this:

Private Sub Form_Load()

Me.Filter = "[Alvo] = " & AlvoAtual  
Me.FilterOn = True  
Me.Requery  

End Sub

where AlvoAtual is global variable, but nothin happens. When I change the AlvoAtual for a specifc value nothin happens too. Like this:

Private Sub Form_Load()

 Me.Filter = "[Alvo] = 'AAAA'"
 Me.FilterOn = True
 Me.Requery

End Sub

Someone knows the problem?

Thank you.

© Stack Overflow or respective owner

Related posts about ms-access

Related posts about vba