Adding a Trend line to a Series in a Graph  in MS Access VBA

Posted on 2007-10-07
Last Modified: 2013-11-27
Hello Access Gurus

I want to add a trend line to my graph programatically.  This is how Excel does it but this syntax does not work in MS Access....  thank you so much.  

 Set chartobj = ![AnalysisGraph].Object.Application.Chart
 chartobj.SeriesCollection(1).Trendlines.Add(Type:=xlLinear, Forward:=0, _
         Backward:=0, DisplayEquation:=False, DisplayRSquared:=False).Select
 With Selection.Border
            .ColorIndex = 57
            .Weight = xlThin
            .LineStyle = xlDot
End With
Question by:cations

    Author Comment

    No Solutions??

    Author Comment

      chartObj.SeriesCollection(1).Trendlines.Add Type:=xlLinear
    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now