An idea for this problem, please

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top