I'm very new to Access 2007, and I'm trying to create a custom Ribbon.
Currently, I basically have the code for the sample in the USysRibbons table
like this:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="dbCustomTab" label="A Custom Tab" visible="true">
<group id="dbCustomGroup" label="Reports">
</group>
</tab>
</tabs>
</ribbon>
</customUI>
I would like to know how to create buttons on the "Reports" group that will
open specific reports in my database. For example, I have a report called
rptDirectory. How do I make a button on the Ribbon that will open the
rptDirectory report?
I'm sure this is very elementary, but like I said, I'm new to Access 2007
and very new to trying to create a custom ribbon.
Thanks for any help you can provide.
|
|
0
|
|
|
|
Reply
|
Utf
|
4/6/2010 8:30:02 PM |
|
Here is some ribbon xml from one of my apps.
On the ribbon there is a button for Reports.
User clicks the button and the menu drops down with a list of reports to
select from.
Clicking a report on the list opens that report.
start of xml------------
<group id="grpCustReports" label="Reports" visible="true">
<menu id="mnuReports" size="large" label="Reports"
imageMso="ViewsReportView" itemSize="large">
<button
id="btnInvoiceJob"
label="Invoicing"
imageMso="CreateReport"
onAction="OnActionButton"
tag="Invoicing"
/>
<button
id="btnCurrentFortnightJob"
label="Job - Current Fortnight"
imageMso="CreateReport"
onAction="OnActionButton"
tag="Time with job details"
/>
<button
id="btnPreviousFortnightJob"
label="Job - Previous Fortnight"
imageMso="CreateReport"
onAction="OnActionButton"
tag="Time with job details"
/>
<button
id="btnCurrentFortnightHours"
label="Times - Current Fortnight"
imageMso="CreateReport"
onAction="OnActionButton"
tag="Time report"
/>
<button
id="btnPreviousFortnightHours"
label="Times - Previous Fortnight"
imageMso="CreateReport"
onAction="OnActionButton"
tag="Time report"
/>
<button
id="btnReportTask"
label="Tasks"
imageMso="CreateReport"
onAction="OnActionButton"
tag="task"
/>
<button
id="btnFix"
label="Database updates"
imageMso="CreateReport"
onAction="OnActionButton"
tag="Database updates"
/>
</menu>
</group>
end of xml------------
"Joshann" <Joshann@discussions.microsoft.com> wrote in message
news:7D9B679C-139C-4EF1-AFC2-D6561673CD30@microsoft.com...
> I'm very new to Access 2007, and I'm trying to create a custom Ribbon.
> Currently, I basically have the code for the sample in the USysRibbons
> table
> like this:
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> <ribbon startFromScratch="true">
> <tabs>
> <tab id="dbCustomTab" label="A Custom Tab" visible="true">
> <group id="dbCustomGroup" label="Reports">
> </group>
> </tab>
> </tabs>
> </ribbon>
> </customUI>
>
> I would like to know how to create buttons on the "Reports" group that
> will
> open specific reports in my database. For example, I have a report called
> rptDirectory. How do I make a button on the Ribbon that will open the
> rptDirectory report?
>
> I'm sure this is very elementary, but like I said, I'm new to Access 2007
> and very new to trying to create a custom ribbon.
>
> Thanks for any help you can provide.
>
|
|
0
|
|
|
|
Reply
|
Jeanette
|
4/7/2010 12:29:13 AM
|
|
I have a few little articles on ribbons that I wrote when I started playing
with Access2007.
http://www.rptsoftware.com/help/microsoft_access_examples/
It might help. You need to get that excel file so you can look up all the
icons and there names and you need to get the basics for the
basRibbonCallbacks routine. Buttons are pretty easy.
Here are some examples:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="onRibbonLoad">
<ribbon startFromScratch="true">
<tabs>
<tab id="tabHome" label="Home">
<group id="grpContacts" label="Contacts" visible="true">
<button id="ContactButton" label="Contacts"
imageMso="CreateTableTemplatesGallery" size="large"
onAction="OnActionButton" />
</group>
<group id="grpActivity" label="Activities" visible = "true">
<button id="ActivityButton" label="Activities" imageMso="FilePrepareMenu"
size="large" onAction="OnActionButton" />
</group>
<group id="grpEvents" label="Events" visible="true">
<button id="EventButton" label="Events" imageMso="AccessTableEvents"
size="large" onAction="OnActionButton" visible="true"/>
</group>
<group id="grpEmployees" label="Employees" visible="true">
<button id="EmployeeButton" label="Employees" imageMso="MeetingsWorkspace"
size="large" onAction="OnActionButton" />
</group>
<group id="grpReports" label="Reports" visible="true">
<button id="ReportButton" label="Reports" imageMso="PropertySheet"
size="large" onAction="OnActionButton" />
</group>
<group id="grpImport" label="Import Data" visible="true">
<button id="ImportButton" label="Import Data"
imageMso="SourceControlCheckIn" size="large" onAction="OnActionButton" />
</group>
<group id="grpAdmin" label="Options" visible="true">
<button id="OpvvvvvtionsButton" label="Setup/Options"
imageMso="OmsAccountSetup" size="normal" onAction="OnActionButton" />
<labelControl id="DateLabel" getLabel="getLabel" />
</group>
<group id="grpInfo" label="Info">
<button id="InfoButton" size="large" label="Info" imageMso="Info"
onAction="OnActionButton"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report Print and View Options">
<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />
<group icvd="ListCommands" label="Print">
<button idMso="FilePrintQuick" keytip="q" size="large"/>
<button idMso="PrintDialogAccess"
label="Print Dialog"
keytip="d" size="large"/>
</group>
<group id="ExportCmds" keytip="e" label="Data Export">
<button idMso="PublishToPdfOrEdoc" keytip="p" size="large"/>
<button id="CreateEmail" label="Email Report (PDF)"
imageMso="FileSendAsAttachment"
enabled="true" size="large"
onAction= "=MySend()"/>
</group>
<group idMso="GroupZoom"></group>
<group id="Exit" keytip="x" label="Exit">
<button idMso="PrintPreviewClose" keytip="c" size="large"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Here's a pretty simple basRibbonCallbacks routine:
Option Compare Database
Option Explicit
Public gobjRibbon As IRibbonUI
Public Sub OnRibbonLoad(ribbon As IRibbonUI)
'Callbackname in XML File "onLoad"
Set gobjRibbon = ribbon
End Sub
Public Sub OnActionButton(control As IRibbonControl)
'Callbackname in XML File "onAction"
On Error Resume Next
Select Case control.ID
Case "ContactButton"
Call OpenForm("frmContactList", 1)
Case "ActivityButton"
Call OpenForm("frmActivityList", 1)
Case "EventButton"
Call OpenForm("frmEventList", 1)
Case "EmployeeButton"
Call OpenForm("frmEmployeeList", 1)
Case "ReportButton"
'Call OpenForm("frmReports", 1)
MsgBox "No reports available at this time. Contact RPT Software
to get reports added to this database.", vbOKOnly, "Sorry - No Report
Available"
Case "ImportButton"
DoCmd.OpenForm "frmImport", , , , acFormEdit, acDialog
Case "OptionsButton"
DoCmd.OpenForm "frmOptions", , , , acFormEdit, acDialog
Case "InfoButton"
DoCmd.OpenForm "frmHelpAbout", , , , acFormEdit, acDialog
End Select
End Sub
Public Sub GetLabel(control As IRibbonControl, ByRef label)
'Callbackname in XML File "getLabel"
Select Case control.ID
Case "DateLabel"
label = Format(Now(), "dddd, mmm d, yyyy")
End Select
End Sub
"Joshann" <Joshann@discussions.microsoft.com> wrote in message
news:7D9B679C-139C-4EF1-AFC2-D6561673CD30@microsoft.com...
> I'm very new to Access 2007, and I'm trying to create a custom Ribbon.
> Currently, I basically have the code for the sample in the USysRibbons
> table
> like this:
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> <ribbon startFromScratch="true">
> <tabs>
> <tab id="dbCustomTab" label="A Custom Tab" visible="true">
> <group id="dbCustomGroup" label="Reports">
> </group>
> </tab>
> </tabs>
> </ribbon>
> </customUI>
>
> I would like to know how to create buttons on the "Reports" group that
> will
> open specific reports in my database. For example, I have a report called
> rptDirectory. How do I make a button on the Ribbon that will open the
> rptDirectory report?
>
> I'm sure this is very elementary, but like I said, I'm new to Access 2007
> and very new to trying to create a custom ribbon.
>
> Thanks for any help you can provide.
>
|
|
0
|
|
|
|
Reply
|
Mark
|
4/7/2010 12:07:34 PM
|
|
Thank you very much!
"Jeanette Cunningham" wrote:
> Here is some ribbon xml from one of my apps.
> On the ribbon there is a button for Reports.
> User clicks the button and the menu drops down with a list of reports to
> select from.
> Clicking a report on the list opens that report.
>
>
> start of xml------------
> <group id="grpCustReports" label="Reports" visible="true">
>
> <menu id="mnuReports" size="large" label="Reports"
> imageMso="ViewsReportView" itemSize="large">
>
> <button
> id="btnInvoiceJob"
> label="Invoicing"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="Invoicing"
> />
>
> <button
> id="btnCurrentFortnightJob"
> label="Job - Current Fortnight"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="Time with job details"
> />
>
> <button
> id="btnPreviousFortnightJob"
> label="Job - Previous Fortnight"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="Time with job details"
> />
>
> <button
> id="btnCurrentFortnightHours"
> label="Times - Current Fortnight"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="Time report"
> />
>
> <button
> id="btnPreviousFortnightHours"
> label="Times - Previous Fortnight"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="Time report"
> />
>
>
> <button
> id="btnReportTask"
> label="Tasks"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="task"
> />
>
>
> <button
> id="btnFix"
> label="Database updates"
> imageMso="CreateReport"
> onAction="OnActionButton"
> tag="Database updates"
> />
>
> </menu>
> </group>
>
> end of xml------------
>
>
> "Joshann" <Joshann@discussions.microsoft.com> wrote in message
> news:7D9B679C-139C-4EF1-AFC2-D6561673CD30@microsoft.com...
> > I'm very new to Access 2007, and I'm trying to create a custom Ribbon.
> > Currently, I basically have the code for the sample in the USysRibbons
> > table
> > like this:
> > <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> > <ribbon startFromScratch="true">
> > <tabs>
> > <tab id="dbCustomTab" label="A Custom Tab" visible="true">
> > <group id="dbCustomGroup" label="Reports">
> > </group>
> > </tab>
> > </tabs>
> > </ribbon>
> > </customUI>
> >
> > I would like to know how to create buttons on the "Reports" group that
> > will
> > open specific reports in my database. For example, I have a report called
> > rptDirectory. How do I make a button on the Ribbon that will open the
> > rptDirectory report?
> >
> > I'm sure this is very elementary, but like I said, I'm new to Access 2007
> > and very new to trying to create a custom ribbon.
> >
> > Thanks for any help you can provide.
> >
>
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
4/7/2010 7:17:01 PM
|
|
Thank you also very much!
"Mark Andrews" wrote:
> I have a few little articles on ribbons that I wrote when I started playing
> with Access2007.
> http://www.rptsoftware.com/help/microsoft_access_examples/
>
> It might help. You need to get that excel file so you can look up all the
> icons and there names and you need to get the basics for the
> basRibbonCallbacks routine. Buttons are pretty easy.
>
> Here are some examples:
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
> onLoad="onRibbonLoad">
> <ribbon startFromScratch="true">
> <tabs>
> <tab id="tabHome" label="Home">
> <group id="grpContacts" label="Contacts" visible="true">
> <button id="ContactButton" label="Contacts"
> imageMso="CreateTableTemplatesGallery" size="large"
> onAction="OnActionButton" />
> </group>
> <group id="grpActivity" label="Activities" visible = "true">
> <button id="ActivityButton" label="Activities" imageMso="FilePrepareMenu"
> size="large" onAction="OnActionButton" />
> </group>
> <group id="grpEvents" label="Events" visible="true">
> <button id="EventButton" label="Events" imageMso="AccessTableEvents"
> size="large" onAction="OnActionButton" visible="true"/>
> </group>
> <group id="grpEmployees" label="Employees" visible="true">
> <button id="EmployeeButton" label="Employees" imageMso="MeetingsWorkspace"
> size="large" onAction="OnActionButton" />
> </group>
> <group id="grpReports" label="Reports" visible="true">
> <button id="ReportButton" label="Reports" imageMso="PropertySheet"
> size="large" onAction="OnActionButton" />
> </group>
> <group id="grpImport" label="Import Data" visible="true">
> <button id="ImportButton" label="Import Data"
> imageMso="SourceControlCheckIn" size="large" onAction="OnActionButton" />
> </group>
> <group id="grpAdmin" label="Options" visible="true">
> <button id="OpvvvvvtionsButton" label="Setup/Options"
> imageMso="OmsAccountSetup" size="normal" onAction="OnActionButton" />
> <labelControl id="DateLabel" getLabel="getLabel" />
> </group>
> <group id="grpInfo" label="Info">
> <button id="InfoButton" size="large" label="Info" imageMso="Info"
> onAction="OnActionButton"/>
> </group>
> </tab>
> </tabs>
> </ribbon>
> </customUI>
>
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> <ribbon startFromScratch="true">
> <tabs>
> <tab id="MyReport" label="Report Print and View Options">
>
> <group idMso="GroupPrintPreviewPrintAccess" />
> <group idMso="GroupPageLayoutAccess" />
> <group idMso="GroupZoom" />
>
>
> <group icvd="ListCommands" label="Print">
> <button idMso="FilePrintQuick" keytip="q" size="large"/>
> <button idMso="PrintDialogAccess"
> label="Print Dialog"
> keytip="d" size="large"/>
> </group>
>
> <group id="ExportCmds" keytip="e" label="Data Export">
> <button idMso="PublishToPdfOrEdoc" keytip="p" size="large"/>
>
> <button id="CreateEmail" label="Email Report (PDF)"
> imageMso="FileSendAsAttachment"
> enabled="true" size="large"
> onAction= "=MySend()"/>
> </group>
>
>
> <group idMso="GroupZoom"></group>
>
> <group id="Exit" keytip="x" label="Exit">
> <button idMso="PrintPreviewClose" keytip="c" size="large"/>
> </group>
>
> </tab>
> </tabs>
> </ribbon>
> </customUI>
>
>
>
> Here's a pretty simple basRibbonCallbacks routine:
> Option Compare Database
> Option Explicit
>
> Public gobjRibbon As IRibbonUI
>
> Public Sub OnRibbonLoad(ribbon As IRibbonUI)
> 'Callbackname in XML File "onLoad"
>
> Set gobjRibbon = ribbon
>
> End Sub
>
> Public Sub OnActionButton(control As IRibbonControl)
> 'Callbackname in XML File "onAction"
> On Error Resume Next
> Select Case control.ID
> Case "ContactButton"
> Call OpenForm("frmContactList", 1)
> Case "ActivityButton"
> Call OpenForm("frmActivityList", 1)
> Case "EventButton"
> Call OpenForm("frmEventList", 1)
> Case "EmployeeButton"
> Call OpenForm("frmEmployeeList", 1)
> Case "ReportButton"
> 'Call OpenForm("frmReports", 1)
> MsgBox "No reports available at this time. Contact RPT Software
> to get reports added to this database.", vbOKOnly, "Sorry - No Report
> Available"
> Case "ImportButton"
> DoCmd.OpenForm "frmImport", , , , acFormEdit, acDialog
> Case "OptionsButton"
> DoCmd.OpenForm "frmOptions", , , , acFormEdit, acDialog
> Case "InfoButton"
> DoCmd.OpenForm "frmHelpAbout", , , , acFormEdit, acDialog
> End Select
> End Sub
>
> Public Sub GetLabel(control As IRibbonControl, ByRef label)
> 'Callbackname in XML File "getLabel"
>
> Select Case control.ID
> Case "DateLabel"
> label = Format(Now(), "dddd, mmm d, yyyy")
>
> End Select
> End Sub
>
>
>
> "Joshann" <Joshann@discussions.microsoft.com> wrote in message
> news:7D9B679C-139C-4EF1-AFC2-D6561673CD30@microsoft.com...
> > I'm very new to Access 2007, and I'm trying to create a custom Ribbon.
> > Currently, I basically have the code for the sample in the USysRibbons
> > table
> > like this:
> > <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> > <ribbon startFromScratch="true">
> > <tabs>
> > <tab id="dbCustomTab" label="A Custom Tab" visible="true">
> > <group id="dbCustomGroup" label="Reports">
> > </group>
> > </tab>
> > </tabs>
> > </ribbon>
> > </customUI>
> >
> > I would like to know how to create buttons on the "Reports" group that
> > will
> > open specific reports in my database. For example, I have a report called
> > rptDirectory. How do I make a button on the Ribbon that will open the
> > rptDirectory report?
> >
> > I'm sure this is very elementary, but like I said, I'm new to Access 2007
> > and very new to trying to create a custom ribbon.
> >
> > Thanks for any help you can provide.
> >
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
4/7/2010 7:18:01 PM
|
|
|
4 Replies
252 Views
(page loaded in 0.27 seconds)
Similiar Articles: Custom Ribbon and Reports - microsoft.public.access.modulesdaovba ...I'm very new to Access 2007, and I'm trying to create a custom Ribbon. Currently, I basically have the code for the sample in the USysRibbons table... Display custom Ribbon/Toolbar in Query Design - microsoft.public ...Display custom Ribbon/Toolbar in Query Design - microsoft.public ..... for the form or report. You can also re-purpose the built in query design ribbon also. ... want ... Hide Ribbon - Show Print - microsoft.public.access.forms ...> Just build an custom ribbon for the report. For each report, you then just > specify that ribbon in the "other tab" > > I have nice report example that has pdf + email ... Print button on ribbon not enabled - microsoft.public.access ...For some time now, I have noticed that occasionally, when we open a report in ... I did experience certain buttons not appearing on the custom ribbon but solved by ... Access 2007-Create Custom Menu - microsoft.public.access ...Custom Ribbon and Reports - microsoft.public.access.modulesdaovba ... I'm very new to Access 2007, and I'm trying to create a custom Ribbon. Currently, I basically have the ... Access 2007 Runtime - Export Report - microsoft.public.access ...I would like to be able to export reports from an Access 2007 program in runtime. The Report Preview Ribbon doesn't have the Export group on it. I created a custom ... find idmso custom tab in ribbon - microsoft.public.excel ...Custom Ribbon and Reports - microsoft.public.access.modulesdaovba ... find idmso custom tab in ribbon - microsoft.public.excel ... Hide Ribbon - Show Print - microsoft ... Viewing toolbar while in report - microsoft.public.access.reports ...Viewing toolbar while in report - microsoft.public.access.reports ..... users, but am having a problem with the custom print ... Reports and Ribbon Bar - microsoft ... Reports and Ribbon Bar - microsoft.public.access.conversion ...Ribbon and Menu Bar - microsoft.public.access Now I have to figure out a way to load another customized ribbon during Query & Report Design ... I have a personalized ... Hide ribbon event not working - microsoft.public.access.forms ...I also tried making > a custom ribbon and that works when viewing reports, but it doesn't > work when viewing forms. Something has gone wrong with this file ... Custom Ribbon and Reports DataBase - DataBase Discussion List ...I am very new to Access 2007, and I am trying to create a custom Ribbon. Currently, I basically have the code for the sample in the USysRibbons table like How to: Apply a Custom Ribbon to a Form or ReportThe ribbon uses text-based, declarative XML markup that simplifies creating and customizing the ribbon. With a few lines of XML, you can create just the right ... Custom Ribbon and ReportsI'm very new to Access 2007, and I'm trying to create a custom Ribbon. Currently, I basically have the code for the sample in the USysRibbons table Custom Ribbon and Reports - microsoft.public.access.modulesdaovba ...I'm very new to Access 2007, and I'm trying to create a custom Ribbon. Currently, I basically have the code for the sample in the USysRibbons table... Report with custom ribbon - Microsoft AnswersI am slowly trying to update some old menu commands and toolbars. I have a db with 2 reports; I would like to assign a custom ribbon to one of the report and have run ... 7/18/2012 4:20:26 PM
|