?? mydata.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMyData
Caption = "我的數(shù)據(jù)庫"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 'CenterScreen
Begin MSComDlg.CommonDialog CDlg
Left = 120
Top = 1440
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.TextBox Text4
Height = 285
Left = 1080
TabIndex = 14
Top = 2280
Width = 3495
End
Begin VB.CommandButton Command5
Caption = "查找下一個(gè)"
Height = 255
Left = 3360
TabIndex = 12
Top = 1920
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "查找第一個(gè)"
Height = 255
Left = 2040
TabIndex = 11
Top = 1920
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "刪除"
Height = 255
Left = 960
TabIndex = 10
Top = 1920
Width = 735
End
Begin VB.CommandButton Command2
Caption = "增加"
Height = 255
Left = 120
TabIndex = 9
Top = 1920
Width = 735
End
Begin VB.CommandButton Command1
Caption = "照片"
Height = 255
Left = 3000
TabIndex = 8
Top = 1560
Width = 975
End
Begin VB.TextBox Text3
DataField = "Birthday"
DataSource = "Data1"
Height = 285
Left = 720
TabIndex = 7
Top = 1200
Width = 1455
End
Begin VB.CheckBox Check1
DataField = "Sex"
DataSource = "Data1"
Height = 255
Left = 720
TabIndex = 6
Top = 840
Width = 255
End
Begin VB.TextBox Text2
DataField = "Name"
DataSource = "Data1"
Height = 285
Left = 720
TabIndex = 5
Top = 480
Width = 1455
End
Begin VB.TextBox Text1
DataField = "ID"
DataSource = "Data1"
Height = 285
Left = 720
TabIndex = 4
Top = 120
Width = 1455
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 300
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "RYK"
Top = 2760
Width = 4335
End
Begin VB.Label Label2
Caption = "查找條件:"
Height = 255
Left = 120
TabIndex = 13
Top = 2280
Width = 975
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
DataField = "Photo"
DataSource = "Data1"
Height = 1335
Left = 2400
Stretch = -1 'True
Top = 120
Width = 2055
End
Begin VB.Label Label1
Caption = "生日:"
Height = 255
Index = 3
Left = 120
TabIndex = 3
Top = 1200
Width = 615
End
Begin VB.Label Label1
Caption = "性別:"
Height = 255
Index = 2
Left = 120
TabIndex = 2
Top = 840
Width = 615
End
Begin VB.Label Label1
Caption = "姓名:"
Height = 255
Index = 1
Left = 120
TabIndex = 1
Top = 480
Width = 615
End
Begin VB.Label Label1
Caption = "號碼:"
Height = 255
Index = 0
Left = 120
TabIndex = 0
Top = 120
Width = 615
End
End
Attribute VB_Name = "frmMyData"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
CDlg.filename = ""
CDlg.ShowOpen
If CDlg.filename <> "" Then
Image1.Picture = LoadPicture(CDlg.filename)
End If
End Sub
Private Sub Command2_Click()
Data1.Recordset.AddNew
End Sub
Private Sub Command3_Click()
With Data1.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
End Sub
Private Sub Command4_Click()
Dim s As String
With Data1.Recordset
s = .Bookmark
.FindFirst Text4.Text
If .NoMatch Then
MsgBox "數(shù)據(jù)未找到"
.Bookmark = s
End If
End With
End Sub
Private Sub Command5_Click()
Dim s As String
With Data1.Recordset
s = .Bookmark
.FindNext Text4.Text
If .NoMatch Then
MsgBox "數(shù)據(jù)未找到"
.Bookmark = s
End If
End With
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\MyData.mdb"
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -