MattBaldry
Self Taught, Learn from the Forums
- Local time
- Today, 20:04
- Joined
- Feb 5, 2019
- Messages
- 330
Hi all,
I have been looking and trying and cannot find the right syntax to open a form and apply a filter to the subform.
Main form is frmProductionManagement, subform is sfrmProductionManagement is in Continuous Form view.
If I set the filter in the subform in design mode to [Outstanding] > 0, it works. The issue I have is I want to open it in 2 ways from my ribbon, one with [Outstanding] > 0 and the other with [Outstanding] = 0
This is the error I get, I just cannot get my head around where I have gone wrong.
Do I need to open the form and then apply filter as a separate step onto the subform?
Hopefully someone can slap my brain and point out the basic mistake I have made.
~Matt
I have been looking and trying and cannot find the right syntax to open a form and apply a filter to the subform.
Main form is frmProductionManagement, subform is sfrmProductionManagement is in Continuous Form view.
If I set the filter in the subform in design mode to [Outstanding] > 0, it works. The issue I have is I want to open it in 2 ways from my ribbon, one with [Outstanding] > 0 and the other with [Outstanding] = 0
Code:
DoCmd.OpenForm "frmProductionManagement",acNormal, , [Forms]![frmProductionManagement]![sfrmProductionManagement]![Outstanding] > 0
This is the error I get, I just cannot get my head around where I have gone wrong.
Do I need to open the form and then apply filter as a separate step onto the subform?
Hopefully someone can slap my brain and point out the basic mistake I have made.
~Matt