access2007功能区开发-modRibbonPrivate模块
时 间:2009-09-08 00:03:09
作 者:朱亦文 ID:61 城市:岳阳
摘 要:Access2007功能区开发-modRibbonPrivate模块
正 文:
Option Compare Database
Option Explicit
'----------------------------------------------------------
'modRibbonPrivate模块 : 与modRibbonPublic模块配合使用
'相关 : clsRibbon类/clsRibbonControl类/modRibbonPublic模块
'日期 : 2009.05.02
'作者 : 朱亦文
'目的 : 设置指定功能区的回调函数,要动态改变属性,必须单独
' 指定回调
'----------------------------------------------------------
'例:Main功能区
'<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" loadImage="LoadImages" onLoad="onRibbonLoad">
' <ribbon startFromScratch="true">
' <tabs>
' <tab id="tabHome" label="任务面板">
' <group id="grpMessage" label="消息">
' <button id="btnMessage" label="最新消息" size="large" getImage="Main_GetImage" tag="message.png" onAction="onButtonClick" />
' <separator id="sepMessage1" />
' <labelControl id="labUnit" getLabel="Main_GetLabel" />
' <labelControl id="labUser" getLabel="Main_GetLabel" />
' <labelControl id="labDate" getLabel="Main_GetLabel" />
' </group>
' </tab>
' </tabs>
' </ribbon>
'</customUI>
'建议 : 回调函数的命名:功能区名称_公共回调函数名称
' 功能区 : Main
' getImage回调
' 名称定义: Main_GetImage
Public Sub Main_GetLabel(control As IRibbonControl, ByRef Label)
Call GetLabel("Main", control, Label)
End Sub
Public Sub Main_GetImage(control As IRibbonControl, ByRef image)
Call GetImage("Main", control, image)
End Sub
Public Sub Main_OnActionButton(control As IRibbonControl)
' MsgBox control.id & " " & control.Tag
Select Case control.id
Case "btnHome": DoCmd.OpenForm "首页"
Case "btnQuit"
If CurrentProject.AllForms("登录").IsLoaded Then DoCmd.Close acForm, "登录"
DisconnectDB
DoCmd.Quit
Case "btnWEB": DoCmd.OpenForm "浏览器"
Case "btnWEBcj": DoCmd.OpenForm "网上长江海事"
Case "btnSecurityExternal": DoCmd.OpenForm "外部安全监管网"
Case "btnDockList": DoCmd.OpenForm "渡口"
Case "btnDockReport": DoCmd.OpenReport "渡口信息卡", acViewPreview
Case "btnShipList": DoCmd.OpenForm "客渡船"
Case "btnShipsReport": DoCmd.OpenReport "渡船信息卡", acViewPreview
Case "btnShipsSecValid": DoCmd.OpenForm "船舶FSC检查"
Case "btnShipMenList": DoCmd.OpenForm "船员"
Case "btnShipMenEval": DoCmd.OpenForm "船员评估"
Case "btnFirstReport": DoCmd.OpenForm "首班报告"
Case "btnLastReport": DoCmd.OpenForm "末班报备"
Case "btnSMSSend": DoCmd.OpenForm "发布手机短信"
Case "btnSendList": DoCmd.OpenForm "发送列表"
Case "btnRecieveList": DoCmd.OpenForm "接收列表"
Case "btnGPSWindow": DoCmd.OpenForm "GPS监控"
Case "btnGPSRecord": DoCmd.OpenForm "GPS监控记录"
Case "btnDockFieldChart": DoCmd.OpenForm "渡口地域分布图", acFormPivotChart
Case "btnDockFieldTable": DoCmd.OpenForm "渡口地域分布表"
Case "btnShipsT": DoCmd.OpenForm "渡船主机吨位"
Case "btnShipsFieldChart": DoCmd.OpenForm "渡船地域分布图", acFormPivotChart
Case "btnShipsFieldTable": DoCmd.OpenForm "渡船地域分布表"
Case "btnShipsFSCCount": DoCmd.OpenForm "渡船安检缺陷统计表"
Case "btnShipMenEvalCount": DoCmd.OpenForm "船员评估统计表"
Case "btnShipsSMSBGSum": DoCmd.OpenForm "渡船有效首班报告统计表"
Case "btnShipsSMSBBSum": DoCmd.OpenForm "渡船有效末班报备统计表"
Case "btnEvalItemSet": DoCmd.OpenForm "船员评估项目管理"
Case "btnEvalMananger": DoCmd.OpenForm "船员评估管理"
Case "btnPlaceMananger": DoCmd.OpenForm "地名"
End Select
' Call testRibbon
End Sub
Access软件网QQ交流群 (群号:54525238) Access源码网店
常见问答:
技术分类:
源码示例
- 【源码QQ群号19834647...(12.17)
- Access对子窗体数据进行批...(10.30)
- 最精简的组合框行来源数据快速输...(10.25)
- Access仿平台的多值选择器...(10.24)
- 【Access日期区间段查询】...(10.22)
- 【Access源码示例】VBA...(10.12)
- Access累乘示例,Acce...(10.09)
- 数值8.88,把整数8去掉,转...(10.08)
- 【Access自定义函数】一个...(09.30)
- 【Access选项卡示例】Ac...(09.09)
学习心得
最新文章
- Access快速开发平台--对上传...(11.22)
- Access快速开发平台企业版--...(11.18)
- 不会用多表联合查询,多表查询没结果...(11.16)
- 【案例分享】主键字段值含有不间断空...(11.16)
- Access快速开发平台--后台D...(11.14)
- 微软Access邀测新Monaco...(11.12)
- Access列表框左右互选、列表框...(11.11)
- 高效率在导入数据前删除记录(11.10)
- Access报价单转订单示例代码(11.08)
- Access系统自带的日期选择器不...(11.08)