QueryObj(ObjName As String, Flag As Integer, Optional Dbs As String = "后端") As Boolean
查询目标(表、查询、窗体、宏、报表、模块),对于前两者可以定义dbs
Flag=acTable、acQuery、acForm等
PBar(ByVal RecValue, ByVal RecMax) '显示进度条
显示进度条
先调用PBar 1,max设置初始值,最后调用一次Pbar Max+1,Max删除进度条
IsExist(ByVal strFileName As String) As Long '返回文件长度
返回文件长度,为0表示文件不存在或不可用
IsPicture(ByVal strType As String) As Integer
判断是否图片扩展名
返回扩展名在下列字符串中的具体单词位置,以分号隔开为一个单词 "*.bmp;*.ico;*.jpg;*.gif;*.png;*.wmf;*.emf"
IsLoaded(ByVal strFormName As String) As Boolean
判断窗体是否装载在内存中
SaveToFile(ObjFileName As String, Optional inDbs As String = "in 后端", Optional Path As String, Optional oTYPE As String = "?!@#$%^&*") As Boolean
保存系统数据到文件中,
path不指定则为当前目录下的子文件夹\附加数据文件中
otype缺省为系统文件
GetFromFile(ObjFileName As String, Optional inDbs As String = "in 后端", Optional oTYPE As String = "?!@#$%^&*") As Boolean
保存文件到系统数据库中
GetFileName(FullFileName As String) As String
取得文件名,去除了路径
GetFilePath(FullFileName As String) As String
取得文件路径,后面没有"\"
GetStartSJ()
取得查询的开始时间
GetEndSJ()
取得查询的结束时间
BackUp(DbsFullPath As String) As Boolean
备份数据库,存放位置为当前目录下的BackUP下,每个数据库最多保存20个备份
返回真表示成功
CompactJetDatabase(DbsFullPath As String, Optional BackupOriginal As Boolean = True)
压缩指定数据库,可选参数为真时先备份,请先关闭数据库,否则出错
SQLRowToCol(strSQL As String, Optional OnlyField As Boolean = False) As String
对SQL语句进行转置
例如有下面查询语句:" select 姓名,学历,人数 from 花名册"
通过上述函数转换后由第一个字段为姓名,其它字段为学历的具体名称,如
select 姓名,大学,高中,初中,小学 from ......
ExeclRpt(ExeclFileName As String, MainRs As DAO.Recordset, SubRs As DAO.Recordset)
将数据导出到有格式的excel表中
MainRS为主查询,SubRS为子查询
SetBtnp(oTYPE As String, Ctl As Control)
为某控件定义帮助功能,如双击某控件弹出文件、颜色、字体对话框等
oTYPE表示:
文件|扩展名类型
字体
颜色
RunCode strFunction
运行函数 strFunction以逗号分隔,第一个为函数名称,其它为参数
CheckSql(strSQL As String) As String
检查SQL语句
OpenDbs(Dbs As String) As DAO.Database
打开数据库(DAO方式)
OpenConn(Dbs As String) As ADODB.Connection
打开连接(ADO方式)
GetUser() As String
取得用户名及姓名,以分号分隔
Opclose(isMaxime As Boolean)
报表预览用
打开或关闭时调用,屏幕最大化或恢复正常
fSetAccessWindow(nCmdShow As Long) As Boolean
' 最大化 Access 窗口
' ?fSetAccessWindow(SW_SHOWMAXIMIZED)
' 最小化 Access 窗口
' ?fSetAccessWindow(SW_SHOWMINIMIZED)
' 隐藏 Access 窗口
' ?fSetAccessWindow(SW_HIDE)
' 正常显示 Access 窗口
' ?fSetAccessWindow(SW_SHOWNORMAL)
OpenReport(RptName As String, Optional isViewPreview As Boolean = True)
打开报表
OpenForm(FormName As String, Optional isDialog As Boolean = False, Optional Args As String = "")
打开窗体
GetProperty(Strpropname As String, Optional IsValue As Boolean = True, Optional AccSDKFlag As Boolean)
取得属性
Changeproperty(Strpropname As String, Varproptype As Variant, Optional Varpropvalue As Variant, Optional AccSDKFlag As Boolean) As Integer
设置属性
ReadPro(FrmName As Form, Optional CaptionFlag As Boolean)
读取窗体设置,并设置窗体图标为 ..\附加数据文件\系统图标.ico
SaveProp(FormName As String, CtlName As String, ProName As String, ProValue As String)
保存窗体属性
SetSysValue(sysName As String, Optional Val As String = "")
设置系统参数
GetSysValue(sysName As String, Optional Flag As Integer = -3)
取得系统参数
ReadINI(sSection As String, sKeyName As String, sINIFileName As String) As String
读取INI文件
WriteINI(sSection As String, sKeyName As String, sValueData As String, sINIFileName As String) As Boolean
写INI文件
ad_HPopMenu(PopName As String, Optional Flag As Integer)
菜单函数入口
GetPinYin(strS As String) As String
取得汉字串声母
If ComboBoxKeyPress(KeyAscii) <> "" Then KeyAscii = 0
组合框keyPress过程调用
PreTable(Optional Dbs As String)
取得所有表定义
Function UpTable(Optional Dbs As String)
更新表定义
DialogFont(ByRef f As FormFontInfo) As Boolean
字体对话框
aDialogColor(prop As Property) As Boolean
颜色对话框
BrowseFolder(szDialogTitle As String) As String
目录对话框
strFilter = ahtAddFilterItem(strFilter, "Access Files (*.mda, *.mdb)", "*.MDA;*.MDB")
加扩展名
ahtCommonFileOpenSave(InitialDir:="C:\", Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, DialogTitle:="Hello! Open Me!")
文件对话框
ReferenceProperties
检查引用
ReferenceFromFile(strFileName As String) As Boolean
增加引用
Word(ByVal strName As String, No As Integer, Optional Ichar As String = " ") As String
取单词
Numwords(ByVal strName As String, Optional Ichar As String = " ") As Integer
取单词数
db(ByVal strName As String, Key As String, Optional Ichar As String = "|") As String
取关键字为Key的值
UpdateDB(ByVal strName As String, Key As String, Value As String, Optional Ichar As String = "|") As String
更新字串
IsNum(DataType As Integer) As Boolean
是否数字类型
IsMember(ByVal strList As String, strName As String, Optional Ichar As String = "|") As Integer
是否成员
UpdateItem(ByVal strList As String, strName As String, Optional strValue As String = "", Optional Ichar As String = "|") As String
更新成员
getDate(strType As String) As Date
取得日期
strType为下列字符串中的一个:
"本月第一天"
"本月最后一天"
"上月最后一天"
"本年第一天"
"去年最后一天"
"本年最后一天"
"本季第一天"
"本周星期一"
|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )
GMT+8, 2024-11-15 09:47 , Processed in 0.060204 second(s), 13 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.