changing msgraph data labels using code
-
I am constructing a graph that plots distance on the x axis and resistivity on the y-axis. There is an extra data series that plots an arrow at various distances to denote a feature, e.g. tree, but to get the arrow in the right place I have to give each point in the series the value 2000. I am able to turn on the data labels and change the orientation, but I can't change the value in the data label from 2000 to "tree". The code from the help files doesn't seem to work: With myChart With .SeriesCollection(1).Points(2) .HasDataLabel = True .DataLabel.Text = "Saturday" End With End With The following code I have written after reading the help file and this doesn't work either: Set chartpath = subGraph!uofGraph.Object.Application.Chart With chartpath.SeriesCollection(6) .HasDataLabels = True .DataLabels.Orientation = 90 End With Set FeatRs = CurrentDb().OpenRecordset(Me!ItemSQL, DB_OPEN_DYNASET) Counter = FeatRs.RecordCount featCount = 1 For X = 1 To Counter If (IsNull(FeatRs.Fields(6).Value)) Then MsgBox "No Feature" FeatRs.MoveNext Else With chartpath.SeriesCollection(6).DataLabels(featCount) .text = "test" End With MsgBox "Some Feature" FeatRs.MoveNext featCount = featCount + 1 End If Next X FeatRs.Fields(6) contains null fields and the value 2000, series 6 is the arrows and has the data labels I want to change. Thanks in advance Marc Robinson