UtterAccess.com
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    
 
   
cpaulk1
post Mar 15 2017, 09:08 AM
Post#1



Posts: 16
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.

CODE
   <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
      <ribbon startFromScratch="true">
         <tabs>
            <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"
                                imageMso="PrintPreviewClose"
                                onAction="btnClosePrintPreview"
                                tag="CloseThisView"/>
                </group>
             </tab>
             <tab idMso="TabHomeAccess" visible="false">
         </tab>
           <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>
             <tab id="TabExport" label="Export" >
                <group idMso="GroupExport" visible="true" />
             </tab>
      </tabs>
      </ribbon>
   </customUI>
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    27th March 2017 - 05:47 AM