Dear Experts!
Sorry to bother you again, in MS access we have a safe net called Optional Explicit , this helps us to ensure that the code we write is correct , now what about XML do we have any and how do we end statements like below:
<customUI xmlns="
http://schemas.microsoft.com/office/2006/01/customui">
</customUI>
foe example I want to add 10 tabs, 10 groups and 10 controls , how do I end the statements . By the way is it true that if we store the XML statements in a table , then each statement like the one above will look like below:
PK RibbonName XmlRibbon
1 MyTab <customUI xmlns="
http://schemas.microsoft.com/office/2006/01/customui">
2 Mytab </customUI>
etc
Kindly assist
Regards
Chris
Then there is also XML schema. A XML schema defines the structure and occurences of elements and data types. You use it to validate a well-formed XML file. When XML schema validation fails, the same from above applies: no further processing.
This means: Your table from above is nonsense, cause you would store invalid XML fragments per row. USysRibbons takes entire ribbon declarations, not fragments.
Further more, as it is about ribbons: See Ribbons for Access. Gunter's site is the best compendium and comes with some code samples and a practical ribbon builder.
But your implicit question answered: You would create and manipulate the UI XML in an appropriate XML editor. Many of them support XML validation for well-formed-ness and schema validation. You than only store a valid UI XML in the USysRibbons table.