Apply OrderBy without eliminating Filter?

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
 
M

Matthew DeAngelis

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
 

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

Top