Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA adjust of Form.Filter and Form.OrderBy causes strange requeries

Status
Not open for further replies.

waldemar

Programmer
Nov 15, 2001
245
DE
So I am using some module functions to adjust the recordsource, the filter and the orderby of a form according some user settings (being saved in some configuration tables):

DoCmd.OpenForm "frmEditClient", acNormal, , , , acWindowNormal
updateClientRecordset
applyClientFilter
updateClientRecordsetOrder

1. Opening the form
2. Setting the Form.Recordsource
3. Applying the Filter (+ setting FilterOn=True)
4. Applying the Order (+ setting OrderByOn=True)

I am using a procedure like this for different data departments (Clients, Invoices, etc.). However in ONE of them something strange happens:

AFTER THE RECORDSET ORDER IS SET (4.), THE FORMER ADJUSTED FILTER IS TURNED OFF AGAIN BY ACCESS. In other words, the filter is removed automatically ("") when I set OrderBy values. Again, this does not happen in the other departments (containing basically the same code). --- Some special access situation again?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top