ApplyFilter Sort problem!!

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

Guest

I have a command button that does the following:

DoCmd.ApplyFilter , "[Client_Internal] = [Client or SRA] AND [Status] =
'Open'"

What I want it to also do is group/sort a field called "Group Name".

What am i missing?

Thanks

Ben
 
I assume the command button is on the Form you want to filter / sort:

Change your code to:

========
With Me
.Filter = "([Client_Internal] = [Client or SRA]) AND ([Status] =
'Open')"
.FilterOn = True
.OrderBy = "[Group Name]"
.OrderByOn = True
End With
========
 
Is [Client or SRA] a "Parameter" you have to enter when the code is executed
or is it a value that already exists somewhere on the Form?
 
..OrderBy = "[Group Name], [IssueID]"

What happens to [Client or SRA] problem?
 
I normally create a unbound TextBox, get the user to fill in the value
required before activating the filter (using the value in the TextBox as the
Parameter values) rather then the Filter getting the value. Some Form
processes in Access seem to run more than once and the value in the TextBox
will be available if the process is repeated.
 

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

Similar Threads


Back
Top