S
Steve
Working on a form that if you enter in a title in a text box, it
appears on the chart itself as a title, however, if you do not enter a
title, it gives me a runtime error. Trying to figure out a way to error
check and either A) make it so they have to enter a title in the text
box for the chart or B) so if you do not enter a title in the text box,
the rest of the information will still print in the title. This is some
code i've been fiddling around with the last couple of days.
Private Sub Form_Load()
If Form_monthlyCharts.Title.Value = IsNull Then
Call No_Title
Else
Call Title
End If
End Sub
Private Sub No_Title()
Me.AvgLevelChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Level Data"
Me.AvgRainChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Rain Data"
Me.LakeDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Lake Data"
Me.LevelDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Level Data"
End Sub
Private Sub Title()
Me.AvgLevelChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Level Data" + "
- " + Forms!monthlyCharts!Title
Me.AvgRainChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Rain Data" + " -
" + Forms!monthlyCharts!Title
Me.LakeDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Lake Data" + " - " +
Forms!monthlyCharts!Title
Me.LevelDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Level Data" + " - " +
Forms!monthlyCharts!Title
End Sub
appears on the chart itself as a title, however, if you do not enter a
title, it gives me a runtime error. Trying to figure out a way to error
check and either A) make it so they have to enter a title in the text
box for the chart or B) so if you do not enter a title in the text box,
the rest of the information will still print in the title. This is some
code i've been fiddling around with the last couple of days.
Private Sub Form_Load()
If Form_monthlyCharts.Title.Value = IsNull Then
Call No_Title
Else
Call Title
End If
End Sub
Private Sub No_Title()
Me.AvgLevelChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Level Data"
Me.AvgRainChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Rain Data"
Me.LakeDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Lake Data"
Me.LevelDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Level Data"
End Sub
Private Sub Title()
Me.AvgLevelChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Level Data" + "
- " + Forms!monthlyCharts!Title
Me.AvgRainChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Average Rain Data" + " -
" + Forms!monthlyCharts!Title
Me.LakeDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Lake Data" + " - " +
Forms!monthlyCharts!Title
Me.LevelDataChart.Object.ChartTitle.Text =
Forms!monthlyCharts!lakeCombo.Value + " - " + "Level Data" + " - " +
Forms!monthlyCharts!Title
End Sub