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:
- Create a new database
- Create a table in that database using the ribbon Create, then Table button
- Close and save that table
- Create a report by selecting the table, and pressing Create, and then Report
- Close and save the report
- In the immediate window, execute
SaveAsText acReport, "Table1", "C:\SomePath\Report.txt"
On PC 2:
- Create a new database
- In the immediate window, execute
LoadFromText acReport, "Table1", "C:\SomePath\Report.txt"
- 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.