R
RickSF
I have a form containing a subform that I want to filter for specific records
when I open the main form via a macro. The Control Source for the Subform is
a query called: BudSpendDetail0QTr that contains the two fields CashFlowMM
and CurrMMYY.
The syntax in the Where condition is:
[Forms]![BudSpendTransit]![BudSpendTransitSub
Subform].[Form]![BudSpendDetail0QTr]![CashFlowMM]=[CurrMMYY]
The result I get is not for the current month (example 01/10) but the prior
month (12/09).
The subform is not linked to the main form, so I leave the Fiter Name blank.
(Otherwise, the condition goes into the properties of the main form, and I
get errors becasue the fields in the query are not in the main form's control
source.)
What is the correct syntax to filter the query that controls the subform?
when I open the main form via a macro. The Control Source for the Subform is
a query called: BudSpendDetail0QTr that contains the two fields CashFlowMM
and CurrMMYY.
The syntax in the Where condition is:
[Forms]![BudSpendTransit]![BudSpendTransitSub
Subform].[Form]![BudSpendDetail0QTr]![CashFlowMM]=[CurrMMYY]
The result I get is not for the current month (example 01/10) but the prior
month (12/09).
The subform is not linked to the main form, so I leave the Fiter Name blank.
(Otherwise, the condition goes into the properties of the main form, and I
get errors becasue the fields in the query are not in the main form's control
source.)
What is the correct syntax to filter the query that controls the subform?