How to add a filter in Visual Basic?

  • Thread starter Thread starter danijela.simunovic
  • Start date Start date
D

danijela.simunovic

How do I add a filter in VB?
is this enough: DoCmd.ApplyFilter , "LastName = 'King'" or I
need something before this which would say in which table or query?
And how do i close the filter,how do i remove it?

Danijela
 
DoCmd.ApplyFilter does not have an argument for the object the Filter will
be applied to. The filter will always be applied to the *active* data
object, i.e. the object in active MDI window which can be DatasheetView of a
Table / a Query or a Form. For Reports, the ApplyFilter will only work in
the Open Event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top