字符串截示例

[color=red]ACCESS 打开网页[/color]

Private Sub cmdAccess_Click()
Dim webAddreess As String
Dim Web
Set Web = CreateObject("InternetExplorer.Application")
Web.Visible = True
WebAddress = "http://www.accessoft.com"
Web.Navigate WebAddress

End Sub


[color=red]ACCESS 执行子窗体SQL[/color]

Private Sub cmdClear_Click()
Me.frmChild.SourceObject = ""
'去掉系统警告
DoCmd.SetWarnings False
'清空截取的字符值
DoCmd.RunSQL "UPDATE tblSizelist SET tblSizelist.size1 = Null, tblSizelist.size2 = Null, tblSizelist.size3 = Null;"
'重新加载子窗体
Me.frmChild.SourceObject = "frmSizelist"
End Sub




[color=red]ACCESS 关闭子窗体[/color]

Private Sub cmdClose_Click()
DoCmd.Close
End Sub



[color=red]ACCESS 打开QQ 对话窗口[/color]

Private Sub cmdQQ_Click()
Dim webAddreess As String
Dim Web
Set Web = CreateObject("InternetExplorer.Application")
Web.Visible = True
WebAddress = "http://wpa.qq.com/msgrd?V=1&Uin=56217686&Site=UMVsoft&Menu=yes"
'打开QQ 对话窗口
Web.Navigate WebAddress

End Sub

Private Sub Form_Load()
'给窗体写上标题
Me.Caption = "实现字符串提取功能的示例"

End Sub



[color=red]ACCESS 截取字符[/color]


Private Sub cmdOK_Click()
Dim RST As DAO.Recordset
Dim strSize As String
Dim strSizeB As String
Dim x As Integer
Dim y As Integer
Me.frmChild.SourceObject = ""
Set RST = CurrentDb.OpenRecordset("tblSizelist", dbOpenDynaset)
RST.MoveFirst
Do Until RST.EOF
RST.Edit
strSize = RST!OrderSize
'获得第一个*号出现的位置
x = InStr(strSize, "*")
strSizeB = Mid(strSize, x + 1)
'获得第二个*出现的位置
y = InStr(strSizeB, "*") + x
RST!size1 = Left(strSize, x - 1)
RST!size2 = Mid(strSize, x + 1, y - x - 1)
RST!size3 = Mid(strSize, y + 1)
RST.Update
RST.MoveNext
Loop
RST.Close
Set RST = Nothing

'重新加载子窗体
Me.frmChild.SourceObject = "frmSizelist"

End Sub
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值