Apply OrderBy without eliminating Filter?

  • Thread starter Thread starter Matthew DeAngelis
  • Start date Start date
M

Matthew DeAngelis

Hi,

I am using the same form with filters to display my company's deals
through a number of different stages (new, assigned, etcetera). The
filters are applied by switchboard command buttons using a Where
condition on the OpenForm action. My problem is this: I would like to
sort the form differently for different filters. I thought that this
would be relatively simple. I declared a public variable, which is set
by the command buttons before they apply the filters, and the form's On
Open event applies the variable to Me.OrderBy. However, in doing so,
the form also removes the filter, which entirely defeats the purpose.

Does anyone know of a way to order a form without removing the filter?


Thanks,
Matt
 
Matthew said:
Hi,

I am using the same form with filters to display my company's deals
through a number of different stages (new, assigned, etcetera). The
filters are applied by switchboard command buttons using a Where
condition on the OpenForm action. My problem is this: I would like to
sort the form differently for different filters. I thought that this
would be relatively simple. I declared a public variable, which is
set by the command buttons before they apply the filters, and the
form's On Open event applies the variable to Me.OrderBy. However, in
doing so, the form also removes the filter, which entirely defeats
the purpose.

Does anyone know of a way to order a form without removing the filter?


Thanks,
Matt

Nevermind. Usage of With Form and With Report statements seems to work.


Thanks,
Matt
 
Back
Top