📄 frmreg.frm
字号:
VERSION 5.00
Begin VB.Form frmreg
BackColor = &H00FFC0C0&
Caption = "Registration"
ClientHeight = 5085
ClientLeft = 60
ClientTop = 450
ClientWidth = 4815
Icon = "frmreg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmreg.frx":0E42
ScaleHeight = 5085
ScaleWidth = 4815
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtid
Height = 495
Left = 1800
TabIndex = 11
Top = 960
Width = 2655
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 300
Left = 240
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 4680
Visible = 0 'False
Width = 1215
End
Begin VB.CommandButton cmdcancel
Caption = "&Cancel"
Height = 495
Left = 2520
TabIndex = 9
Top = 3960
Width = 1695
End
Begin VB.CommandButton cmdsubmit
Caption = "&Submit"
Height = 495
Left = 600
TabIndex = 8
Top = 3960
Width = 1695
End
Begin VB.TextBox txtphone
Height = 495
Left = 1800
TabIndex = 7
Top = 3120
Width = 2655
End
Begin VB.TextBox txtdob
Height = 495
Left = 1800
TabIndex = 6
Top = 2400
Width = 2655
End
Begin VB.TextBox txtadd
Height = 495
Left = 1800
MultiLine = -1 'True
TabIndex = 5
Top = 1680
Width = 2655
End
Begin VB.TextBox txtname
Height = 495
Left = 1800
TabIndex = 4
Top = 240
Width = 2655
End
Begin VB.Label lblid
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "ID:"
Height = 495
Left = 240
TabIndex = 10
Top = 1080
Width = 1215
End
Begin VB.Label lblphone
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "Phone or H/P:"
Height = 495
Left = 240
TabIndex = 3
Top = 3240
Width = 1215
End
Begin VB.Label lbldob
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "Date of Birth:"
Height = 495
Left = 240
TabIndex = 2
Top = 2520
Width = 1215
End
Begin VB.Label lbladd
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "Address:"
Height = 495
Left = 240
TabIndex = 1
Top = 1800
Width = 1215
End
Begin VB.Label lblname
BackColor = &H00FFC0C0&
BackStyle = 0 'Transparent
Caption = "Name:"
Height = 495
Left = 240
TabIndex = 0
Top = 360
Width = 1215
End
End
Attribute VB_Name = "frmreg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdsubmit_Click()
If txtname.Text <> "" Then
If txtid.Text <> "" Then
If txtadd.Text <> "" Then
If txtdob.Text <> "" Then
If txtphone.Text <> "" Then
With Data1.Recordset
.AddNew
!Name = txtname
!id = txtid
!Address = txtadd
!dob = txtdob
!Phone = txtphone
.Update
MsgBox "Data Added!!", vbInformation
txtname = ""
txtid = ""
txtadd = ""
txtdob = ""
txtphone = ""
End With
Else
MsgBox "Please enter the phone number!", vbExclamation
End If
Else
MsgBox "Please enter the date of birth!", vbExclamation
End If
Else
MsgBox "Please enter the address!", vbExclamation
End If
Else
MsgBox "Please enter the required ID!", vbExclamation
End If
Else
MsgBox "Please enter the name!", vbExclamation
End If
End Sub
Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "/video.mdb"
Data1.RecordSource = "Select * from member"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -