1

I'm using a version control and update solution similar to the one described in this answer that uses SaveAsText and LoadFromText to manage incremental updates.

However, a problem arose recently when loading reports saved using LoadFromText that had been created using SaveAsText on different computers. I tracked this problem down to the following issue:

MCVE

On PC 1:

  1. Create a new database
  2. Create a table in that database using the ribbon Create, then Table button
  3. Close and save that table
  4. Create a report by selecting the table, and pressing Create, and then Report
  5. Close and save the report
  6. In the immediate window, execute SaveAsText acReport, "Table1", "C:\SomePath\Report.txt"

On PC 2:

  1. Create a new database
  2. In the immediate window, execute LoadFromText acReport, "Table1", "C:\SomePath\Report.txt"
  3. I receive a generic error, a file called error.txt is created at the database location, and in it, it says Expected: object name. Observed: IvyChart.

Further observations:

The text file Report.txt is approximately 100 KB (previous exports of reports based on small tables were around 40 KB).

In the report.txt file, you can find the report contains:

  • A BoundObjectFrame
  • A Chart
  • An UnboundObjectFrame
  • A CustomControl
  • A WebBrowser
  • A NavigationControl
  • An IvyChart with the following properties:

    UnknownProp = {48 ,329 ,2 ,1 ,1 } Begin
        0x00
    End
    UnknownProp = {49 ,11 ,2 ,1 ,1 } Begin
        0x00
    End
    UnknownProp = {98 ,150 ,3 ,4 ,2 } Begin
        0xb811
    End
    UnknownProp = {99 ,44 ,3 ,4 ,2 } Begin
        0x130b
    End
    UnknownProp = {260 ,462 ,4 ,4 ,4 } Begin
        0x27000080
    End
    UnknownProp = {295 ,616 ,4 ,0 ,4 } Begin
        0x01000000
    End
    UnknownProp = {300 ,756 ,10 ,4 ,22 } Begin
        0x4300680061007200740020005400690074006c006500
    End
    

None of the other controls have these UnknownProp properties.

When I create the report on PC 2, using the same steps, all these controls don't show up.

All these controls are not visible on the report itself. The problem mainly manifests when exporting from a computer with Office 2016 (365) version 1803, and importing in an older version of Office 2016

Access is not using any add-ins, COM or otherwise. This occurs with blank databases, so only using the default references.

Has anyone got any idea what this IvyChart object is, why it's on all newly created reports based on existing objects, and why all these other seemingly random invisible controls come with it?

Can I stop Access adding these invisible controls to new reports?

Googling IvyChart or consulting other resources has brought no insight at all.

I can just open the database on PC 2 and use SaveAsText from there. However, if I do that, the weird controls aren't there but text file is full of lines like this:

Begin
End

This makes importing the text file invalid on any computer.

My workaround for now is when creating a new report based on an object, to select all controls, copy all controls (using ctrl + A) to a blank report, and then save the report. The fact that this works, and these hidden controls causing errors aren't copied, also feels a bit iffy to me.

Erik A
  • 31,639
  • 12
  • 42
  • 67

1 Answers1

3

IvyChart is the internal control name for the new Chart control type that was added in O365. Office 2016 does not support this control type, so you get an error when trying to LoadFromText a form or report that contains them.

Note that 2016 Access can still open these forms/reports, but will not display the chart.

If you want to use the new charts, you need to use Office 365, or Office 2019.

  • Thanks, that's very helpful. But do you know why it's included in a new report created by selecting a table and going to _Create_ and then _Report_? There's no visible chart on the report (even in the version of Access that created it). – Erik A Jan 23 '19 at 19:36
  • 1
    Yes, every form/report has a 'default' version of each control type it supports. The default control specifies properties that are shared by all control instances of that type. You can actually control the properties set on the default control by selecting that control type in the toolbox, then setting properties in the property sheet. Unfortunately, that does mean that you can't use source code control to share forms/reports between different versions of Access (at least when new control types have been added between versions) – Shane L. Groff Jan 24 '19 at 00:38