X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> "button Is Unexpected" Error, Access 2007    
post Mar 15 2017, 09:08 AM

Posts: 22
Joined: 17-May 16

I have a custom ribbon for a program that runs a routine when a custom "Close Print Preview" button is clicked. This may seem odd, but I do it because of a bug that seems to be exclusive to Access 2007 that causes the report to go into Design View when Close Print Preview is clicked, so I'm going to run my own routine for closing it because opening Design View like that is both annoying, makes it look unprofessionally designed, and is a security hazard. When I try to open the report, however, it gives me an error message "0x80004005, 'button' is unexpected according to content model of parent element 'tab'." It references line 10, column 127, which is my custom button. I'm failing to see what I've done wrong; so maybe another pair of eyes can catch my mistake. I would really appreciate some help.

   <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
      <ribbon startFromScratch="true">
            <tab id="TabPrint" label="Print">
                <group idMso="GroupPrintPreviewPrintAccess" visible="true"/>
                <group idMso="GroupPageLayoutAccess" visible="true"/>
                <group idMso="GroupZoom" visible="true"/>
                <group idMso="GroupPrintPreviewData" visible="true"/>
                <group id="GroupPreviewClose" label="My Group">
                   <button id="ClosePrintPreview"
                                label="My Print Preview"
             <tab idMso="TabHomeAccess" visible="false">
           <tab id="TabTools" label="Tools">
            <group idMso="GroupSortAndFilter" visible="true" />
               <group idMso="GroupClipboard" visible="true" />
               <group idMso="GroupFontAccess" visible="false" />
               <group idMso="GroupRichText" visible="false" />
               <group idMso="GroupRecords" visible="false" />
               <group idMso="GroupWindowAccess" visible="false" />
               <group idMso="GroupFindAccess" visible="true" />
             <tab id="TabExport" label="Export" >
                <group idMso="GroupExport" visible="true" />
Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    23rd October 2018 - 09:42 PM