注册 登录
Office中国论坛/Access中国论坛 返回首页

todaynew的个人空间 http://www.office-cn.net/?144436 [收藏] [复制] [分享] [RSS]

日志

分享 闲话小抄
2009-3-22 18:38
酒可以当茶,茶不可以当酒; 诗可以当文,文不可以当诗; 曲可以当词,词不可以当曲; 月可以当灯,灯不可以当月; 笔可以当口,口不可以当笔; 婢可以当奴,奴不可以当婢。 文人讲武事,大 ...
个人分类: 闲话|906 次阅读|0 个评论
分享 导出Excel主从表示例
2009-3-22 14:22
导出Excel主从表示例
公共模块 Public Function GetFolder() As String '文件及文件夹路径函数 Dim dlgOpen As FileDialog Dim i As Long, j As Long Set dlgOpen = Application.FileDialog(msoFileDialogOpen) With dlgOpen   ...
个人分类: 习作|1274 次阅读|1 个评论 热度 1
分享 Excel之间数据传递
2009-3-19 12:54
Function GetFolder() As String '文件及文件夹路径函数 Dim dlgOpen As FileDialog Dim i As Long, j As Long Set dlgOpen = Application.FileDialog(msoFileDialogOpen) With dlgOpen .AllowM ...
个人分类: 习作|1072 次阅读|1 个评论
分享 导出Excel函数
2009-3-9 13:42
' 导出 Excel 函数 'Qname-- 查询名称 'Pfrmane-- 父窗体名称 'Ctlname-- 子窗体控件名称 'n--n=1 按子窗体, n=2 按子窗体数据源查询 Public Function myoutE(Qname As String, Pfrmname As String, Ctlname As String, n As Long) Dim myform As Form ...
个人分类: 习作|1007 次阅读|0 个评论 热度 1
分享 用VB创建和修改查询
2009-3-7 18:27
用VB创建和修改查询
Option Compare Database Dim Qdef As QueryDef Dim strsql As String Dim strname As String Private Sub Form_Error(DataErr As Integer, Response As Integer)   Me.子窗体.Form.RecordSource = "成绩查询" End Sub Private Sub Form_Open(Cancel As Integer)   Me.子窗体.Form.Rec ...
个人分类: 习作|1155 次阅读|0 个评论
分享 用VB创建和修改表
2009-3-4 16:57
用VB创建和修改表
一、主窗体代码 Option Compare Database Dim strsql As String Dim strname As String Private Sub Form_Load() Me. 字段子窗体 .Form.AllowAdditions = False Me. 字段子窗体 .Form.AllowEdits = False Me. 字段子窗体 .Form.Al ...
个人分类: 习作|823 次阅读|0 个评论
分享 人民币大写函数
2009-2-28 16:41
Function RMB(x As Double) As String Dim i1 As Long, i2 As Long, j As Long, m As Long, strm(15) As String Dim strB1 As String, strB2 As String RMB = str(Round(x, 4)) j = InStr(1, RMB, ".", 1) If j = 0 Then strB1 = Trim(RMB) strB2 = "" Else st ...
个人分类: 习作|841 次阅读|0 个评论
分享 数组运用习作
2009-2-16 17:54
Private Sub Command2_Click() Dim rs As New ADODB.Recordset Dim sql As String, sqlf As String Dim strf(10) As String Dim i As Long, j As Long sql = "select * from temp" rs.Open sql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic i = 0 Do While Not rs.EOF i = i + 1   ...
个人分类: 习作|712 次阅读|0 个评论
分享 FSO,驱动器、文件
2009-2-14 15:28
1、判断光驱的盘符: Function GetCDROM() 返回光驱的盘符(字母) Dim Fso As New FileSystemObject 创建 FSO 对象的一个实例 Dim FsoDrive As Drive, FsoDrives As Drives 定义驱动器、驱动器集合对象 Set FsoDrives = Fso.Drives ...
个人分类: 资料|861 次阅读|0 个评论
分享 AddNew 方法
2009-2-12 20:30
AddNew 方法 创建可更新的 Recordset 对象的新记录。 语法 recordset.AddNew FieldList, Values 参数 recordset Recordset 对象。 FieldList 可选。新记录中字段的单个名称、名称数组或序号位置数组。 Values 可选。新记录中字段的单个值或值的数组。如果 Fieldlist 是数组,那么 Values 也必须是具有相同数目的 ...
个人分类: 资料|1080 次阅读|0 个评论

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-4-28 21:36 , Processed in 0.084908 second(s), 13 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部