A
an
Hello!
I need to change graphs in SubForm trough choose in
combobox in mainForm.
For this I have:
Table T_AllData with Name, Date and Value fields;
Table T_MonthYear: MonthYear field (JAN01, FEB01,
MAR01, ...);
Queries, based in T_AllData. A query for each MonthYear
and work fine.
In Main Form:
A combobox to choose MonthYear, based in T_MonthYear.
A command button to confirm previous choose, with:
Private Sub cmdConfirm_Click()
Dim strQueryName As String
strQueryName = Choose
(Me.CboMonthYear.Value, "Q_JAN01", "Q_FEB01", "Q_MAR01")
DoCmd.OpenForm "SubF_Graph", OpenArgs:=strQueryName
End Sub
In SubF_Graph, On Load Event Procedure:
Me.RecordSource = Me.OpenArgs
I would like another idea to decide this problem because
this solution doesn't work and I don't know why.
Thanks in advance.
an
I need to change graphs in SubForm trough choose in
combobox in mainForm.
For this I have:
Table T_AllData with Name, Date and Value fields;
Table T_MonthYear: MonthYear field (JAN01, FEB01,
MAR01, ...);
Queries, based in T_AllData. A query for each MonthYear
and work fine.
In Main Form:
A combobox to choose MonthYear, based in T_MonthYear.
A command button to confirm previous choose, with:
Private Sub cmdConfirm_Click()
Dim strQueryName As String
strQueryName = Choose
(Me.CboMonthYear.Value, "Q_JAN01", "Q_FEB01", "Q_MAR01")
DoCmd.OpenForm "SubF_Graph", OpenArgs:=strQueryName
End Sub
In SubF_Graph, On Load Event Procedure:
Me.RecordSource = Me.OpenArgs
I would like another idea to decide this problem because
this solution doesn't work and I don't know why.
Thanks in advance.
an