locked
MS Graph in Access 2010 RRS feed

  • Question

  • so I have a graph created using MS Graph in Access 2010.

    It used to work on all the systems.

    Now it does not show up on some systems but it shows on mine.  The subform loads but the graph control is empty.

    The system where it does not show is running Access 2010 14.0.7153.5000 32-bit

    I am running 14.0.7159.5000 32-bit and it works on my system.  we are using the same Access frontend and backend files.

    Any ideas?

    Saturday, October 24, 2015 12:44 PM

Answers

  • First thing I would check if the graph component is installed on the computer that does not display the graph. Open control panel/progtams and features, and open the Office 2010 to change the installation. If it is installed, perform a repair of the Office installation.

    Matthias Kläy, Kläy Computing AG

    • Marked as answer by serenejen Thursday, October 29, 2015 10:00 AM
    Saturday, October 24, 2015 4:30 PM

All replies

  • First thing I would check if the graph component is installed on the computer that does not display the graph. Open control panel/progtams and features, and open the Office 2010 to change the installation. If it is installed, perform a repair of the Office installation.

    Matthias Kläy, Kläy Computing AG

    • Marked as answer by serenejen Thursday, October 29, 2015 10:00 AM
    Saturday, October 24, 2015 4:30 PM
  • Thanks for your response.

    Yes it is installed.  Will check with tech staff to see if they can do the repair.

    Sunday, October 25, 2015 1:26 AM
  • Also does not hurt to get current with Microsoft Updates, so you will all be on the same version.

    -Tom. Microsoft Access MVP

    Sunday, October 25, 2015 2:00 AM
  • yes thanks.  I asked for that the same time.
    Sunday, October 25, 2015 2:01 AM
  • Hi serenejen,

    Have your issue been resolved? If you have, I suggest you mark the helpful reply as answer, if not, please feel free to let us know what you have tried, and the current situation.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, October 26, 2015 3:17 AM
  • Finally got the reinstall/upgrade done. and yes the charts are showing up again. Thanks much.
    Thursday, October 29, 2015 10:01 AM
  • Sorry if this is not what you are looking for, but MS Access doesn't have very [powerful graphics options.  Excel, on the other hand, has great and very powerful, graphing options.  Can you use MS Access to tap into Excel, and use Excel's graphing features and controls?  You can easily control Excle's charting features, through MS Access . . 

    ‘EARLY BINDING
    Option Compare Database
    Option Explicit ' Use this to make sure your variables are defined
    
    ' One way to be able to use these objects throughout the Module is to Declare them
    ' Here and not in a Sub
    
    Private objExcel As Excel.Application
    Private xlWB As Excel.Workbook
    Private xlWS As Excel.Worksheet
    
    Sub Rep()
    
    Dim strFile As String
    
    strFile = "C:\Users\Excel\Desktop\YourExcelFile.xls"
    
    ' Opens Excel and makes it Visible
    Set objExcel = New Excel.Application
    objExcel.Visible = True
    
    'Opens up the Workbook
    Set xlWB = objExcel.Workbooks.Open(strFile)
    
    'Sets the Workseet to the last active sheet - Better to use the commented version and use the name of the sheet.
    Set xlWS = xlWB.ActiveSheet
    'Set xlWS = xlWB("Sheet2")
    
    With xlWS ' You are now working with the Named file and the named worksheet
    
    
    End With
    
    'Do Close and Cleanup
    End Sub
    
    
     
    ‘LATE BINDING
    Sub ControlExcelFromAccess()
    
    ' No reference to a type library is needed to use late binding.
    ' As long as the object supports IDispatch, the method can
    ' be dynamically located and invoked at run-time.
    
    ' Declare the object as a late-bound object
      Dim oExcel As Object
      Dim strFile As String
      
      strFile = "C:\Users\Excel\Desktop\YourExcelFile.xls"
    
      Set oExcel = CreateObject("Excel.Application")
    
    ' The Visible property is called via IDispatch
      oExcel.Visible = True
      
      Set xlWB = oExcel.Workbooks.Open(strFile)
    
    'Call Ron's code here . . .
    
    Set oExcel = Nothing
    
    End Sub
    
    
    ********  ********  ********  ********  ********  ********  ********  ********  ********  
    
    
    Early binding
    •	The compiler can work out where the called function will be at compile time.
    •	The compiler can guarantee early (before any of the programs code runs) that the function will exist and be callable at runtime.
    •	The compiler guarantees that the function takes the right number of arguments and that they are of the correct type. It also checks that the return value is of the correct type.
    Late-binding
    •	The lookup will take longer because its not a simple offset calculation, there are usually text comparisons to be made.
    •	The target function may not exist.
    •	The target function may not accept the arguments passed to it, and may have a return value of the wrong type.
    •	With some implementations, the target method can actually change at run-time. So, the lookup may execute a different function. I think this happens in the Ruby language, you can define a new method on an object while the program is running. Late-binding allows function calls to start calling a new override for a method instead of calling the existing base method.
    
    ********  ********  ********  ********  ********  ********  ********  ********  ********  
    
    Practically speaking, COM objects are used through two basic means: early and late binding. When an application makes object references that are resolvable at compile time, the object is early bound. To early bind an object in Visual Basic, you add a reference to the library containing the object during development, then "Dim" specific instances of it. To early bind an object in tools like Visual C++ and Delphi, you import the object's type library and work with the interfaces it provides. In either case, you code directly to the interfaces exposed by the object as though they were interfaces you created yourself. The object itself may live on a completely separate machine and may be accessed via Distributed COM (DCOM) or may be marshaled by a transaction manager such as Microsoft Transaction Server or Component Services. Generally speaking, you don't care; you just code to the interface. 
    
    When references to an object aren't known until runtime, the object is late bound. You normally instantiate late bound objects via a call to CreateObject() and store the object instance in a variant. Because the compiler didn't know what object you were referencing at compile time, you may encounter bad method calls or nonexistent properties at runtime. This is the tradeoff with late binding: It's more flexible in that you can decide at runtime what objects to create and can even instantiate objects that didn't exist on the development system, but it's also more error prone. It's easy to make mistakes when you late bind objects because your development environment can't provide the same level of assistance that it can when it knows the objects you're dealing with. 
    
    Once you have an instance of an object, you call methods and access properties on it like any other object. COM supports the notion of events (although they're a bit more trouble to use than they should be), so you can subscribe and respond to events on COM objects as well.
    
    ********  ********  ********  ********  ********  ********  ********  ********  ********  
    
    RUN EXCEL MACRO FROM MS ACCESS:
    Option Compare Database
    
    Private Sub Command0_Click()
        Call Test
    End Sub
    
     'In Access
    Sub Test()
        Dim mysheet As Object, myfield As Variant, xlApp As Object
         
         ' Set object variable equal to the OLE object.
        Set xlApp = CreateObject("Excel.Application")
        Set mysheet = xlApp.Workbooks.Open("C:\Users\Excel\Desktop\Work Samples\Import Income Statements.xlsb").Sheets(1)
         
         ' Set the Visible property of the sheet to True
         ' Run the macro in Excel
         ' Save the sheet, and quit Microsoft Excel.
        mysheet.Application.Windows("Import Income Statements.xlsb").Visible = True
        mysheet.Application.Run "ImportIS"
        mysheet.Application.ActiveWorkbook.SaveAs "C:\Users\Excel\Desktop\Work Samples\Import Income Statements.xlsb"
        mysheet.Application.ActiveWorkbook.Close
        xlApp.Quit
         
         ' Clear the object variable.
        Set mysheet = Nothing
         
    End Sub
    
    

    Post back if you have additional questions.


    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Thursday, November 5, 2015 12:56 AM