[color=red]ACCESS 打开网页[/color]
[color=red]ACCESS 执行子窗体SQL[/color]
[color=red]ACCESS 关闭子窗体[/color]
[color=red]ACCESS 打开QQ 对话窗口[/color]
[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