Here is example of my code that sets some properties of graph.
Code:
With Me.gphWeight
.Axes(xlCategory).MinimumScale = MinAC
.Axes(xlCategory).MaximumScale = MaxAC
.Axes(xlValue).MinimumScale = MinUWT
.Axes(xlValue).MaximumScale = MaxUWT
.Axes(xlValue).MinorUnit = MnrUWT
.Axes(xlValue).MajorUnit = MajUWT
.Axes(xlValue, xlPrimary).HasTitle = True
If Me!Metric = True Then
.Axes(xlValue, xlPrimary).AxisTitle.Text = "Unit Weight, kg/cu.m"
End If
End With
I have never set the RowSource property so maybe I spoke too soon to say that it could be done, but I think should be like:
Me.gphWeight.RowSource = "some sql statement here"
Me.gphWeight.Requery