?? form2.frm
字號:
VERSION 5.00
Begin VB.Form Form2
Caption = "登記"
ClientHeight = 4800
ClientLeft = 60
ClientTop = 345
ClientWidth = 9270
LinkTopic = "Form2"
ScaleHeight = 47.935
ScaleMode = 0 'User
ScaleWidth = 92.457
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 1215
Index = 4
Left = 6240
TabIndex = 5
Text = "Text1"
Top = 960
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 1335
Left = 360
TabIndex = 4
Top = 2760
Width = 3015
End
Begin VB.TextBox Text1
Height = 1215
Index = 3
Left = 4800
TabIndex = 3
Text = "Text1"
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 1215
Index = 2
Left = 3240
TabIndex = 2
Text = "Text1"
Top = 840
Width = 1095
End
Begin VB.TextBox Text1
Height = 1215
Index = 1
Left = 1560
TabIndex = 1
Text = "Text1"
Top = 720
Width = 1095
End
Begin VB.TextBox Text1
Height = 1215
Index = 0
Left = 240
TabIndex = 0
Text = "Text1"
Top = 840
Width = 1095
End
Begin VB.Label Label1
Caption = "類別"
Height = 375
Index = 4
Left = 6360
TabIndex = 10
Top = 240
Width = 1095
End
Begin VB.Label Label1
Caption = "工作電話"
Height = 375
Index = 3
Left = 4680
TabIndex = 9
Top = 240
Width = 1095
End
Begin VB.Label Label1
Caption = "名字"
Height = 375
Index = 2
Left = 3120
TabIndex = 8
Top = 120
Width = 1095
End
Begin VB.Label Label1
Caption = "地址"
Height = 375
Index = 1
Left = 1680
TabIndex = 7
Top = 240
Width = 1095
End
Begin VB.Label Label1
Caption = "單位"
Height = 375
Index = 0
Left = 240
TabIndex = 6
Top = 240
Width = 1095
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim DBConn As ADODB.Connection
Dim DBRst As ADODB.Recordset
Dim SqlText As String
Set DBConn = CreateObject("ADODB.Connection")
Set DBRst = CreateObject("ADODB.Recordset")
DBConn.ConnectionString = "DBQ=" + App.Path + "\db1.mdb;Driver={Microsoft Access Driver (*.mdb)}"
DBConn.Open
Set DBRst.ActiveConnection = DBConn
SqlText = "Select * from data where num is null "
DBRst.Open SqlText, , 2, 3 'Open recordset.
DBRst.AddNew
DBRst("dep") = Text1(0).Text
DBRst("add") = Text1(1).Text
DBRst("name") = Text1(2).Text
DBRst("mobile") = Text1(3).Text
DBRst("style") = Text1(4).Text
DBRst.Update
MsgBox "操作成功!!!"
DBRst.Close
DBConn.Close
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -