ApplyFilter with Access 2003

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

Guest

I have an app in Access XP that works fine.
On converting to 2003 there is a subform that has a button that executes

DoCmd.RunCommand acCmdFilterByForm
DoCmd.RunCommand acCmdClearGrid

After the user makes the filter selections they click the Apply Filter Icon
at the top.
This works in Access XP but fails to retrun any records in 2003. Also there
is a control on the subform that has it's controlsource as

="Filter " & [Filter]

This also worked XP but under 2003 returns #Name?.

The filter can be from any combination of fields, oddly the filter can be
applied from the Advanced Query under either version, this is not really a
solution since my users freak with the Advanced Query and have gotten to
enjoy the acCmdFilterByForm.

Is there a simple solution to my dilemma?

Thanks
 
I think have a solution for thos interested.

My mainform was unbound with no linkage between the mainform and subform.
I put a bogus table as the recordset for the mainfom, still without any
linkage to the master and child forms.

Then I created a custom toolbar command that run a function to the filter
twice. Presumable for the main form (no purpose) and then the real subform. I
could not get the proper syntax tio display the subform filter so I stuffed
it in a label as a caption.

DoCmd.RunCommand acCmdApplyFilterSort
DoCmd.RunCommand acCmdApplyFilterSort
Forms![Frm_RptFilter]![FRM_LABOR].Form![txtfilter].Caption = "Filter " &
Forms![Frm_RptFilter]![FRM_LABOR].Form.Filter

This seems pretty bogus but it work for me.
 
I think that filters on subforms have been undependable
for a while: I was more surprised that you got it to work
in A2000 than that it didn't work in A2003. Your solution
is interesting, and may help other people.

The failure of your control to show the [Filter] property
is an undocumented general feature of A2003: for some reason
form and report properties may no longer be used in a control
source.

(david)
 
Back
Top