#DEFINE crlf CHR(13)+CHR(10) #DEFINE tab CHR(9) CREATE CURSOR graph (graph g) APPEND BLANK nomsgraph=.f. ON ERROR nomsgraph=.t. APPEND GENERAL graph CLASS "msgraph.chart" ON ERROR IF nomsgraph messagebox("no ms-graph found!..") RETURN .f. ENDIF cdata="" SELECT sales SCAN cdata=m.cdata+tab+month_name ENDSCAN cdata=cdata+crlf+"Month" SCAN cdata=cdata+tab+trans(amount) ENDSCAN SELECT graph APPEND GENERAL graph DATA m.cData thisform.graph.ControlSource="graph.graph" thisform.graph.hastitle=.t. thisform.graph.ChartTitle.Caption=" Sales " *thisform.graph.Legend.Shadow=.t.Note: Maybe I did some syntax mistakes when summarising... Should be care for mistakes...