how to apply filter by selection option thru code in MS Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We can use filter by selection by selecting appropriate button. but it should
be achievable by using code once particular text box got focus. how to do
this.
 
If you want to use a CommandButton, use the following code in the Click
Event:

Screen.PreviousControl.SetFocus
' You need this since the CommandButton now has the Focus and
' and you need to send the Focus back to the TextBox
DoCmd.RunCommand acCmdFilterBySelection
 

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