A
Andrew Backer
Hello,
I have a pretty simple form/subform setup.
In the subform I have a footer that includes controls to total up all
items. I reference these controls in the main form to show the totals.
The subform's recordsource is set to a query which does some pretty
simple filtering to remove 'deleted' records.
The problem is that when I apply a filter (filter,filterOn) I get
'#error' in the main form where it should show the values from teh sub
form.
I get around this error by setting the control source of one of my
controls to itself, reseting it in a way. I have 3 controls, but if I
reset one the other 2 are also fixed.
The Control Source :
=IIf([subform].Form.Recordset.RecordCount=0,0,nz([subform].Form!txtSum,0))
The code looks something like this :
Me.subForm.Form.Filter = "..."
Me.subForm.Form.FilterOn = true
Me.someControl.controlSource = me.someControl.ControlSource
I got around this obviously, but it just doesn't seem right. Cany
anyone explain?
-[ Andrew Backer / abacker .@. comcast .dot. net ]-
I have a pretty simple form/subform setup.
In the subform I have a footer that includes controls to total up all
items. I reference these controls in the main form to show the totals.
The subform's recordsource is set to a query which does some pretty
simple filtering to remove 'deleted' records.
The problem is that when I apply a filter (filter,filterOn) I get
'#error' in the main form where it should show the values from teh sub
form.
I get around this error by setting the control source of one of my
controls to itself, reseting it in a way. I have 3 controls, but if I
reset one the other 2 are also fixed.
The Control Source :
=IIf([subform].Form.Recordset.RecordCount=0,0,nz([subform].Form!txtSum,0))
The code looks something like this :
Me.subForm.Form.Filter = "..."
Me.subForm.Form.FilterOn = true
Me.someControl.controlSource = me.someControl.ControlSource
I got around this obviously, but it just doesn't seem right. Cany
anyone explain?
-[ Andrew Backer / abacker .@. comcast .dot. net ]-