?? 新會員.frm
字號:
VERSION 5.00
Begin VB.Form form8
Caption = "Form1"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text4
Height = 375
Left = 1920
TabIndex = 9
Top = 2160
Width = 735
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3000
TabIndex = 8
Top = 2640
Width = 975
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 375
Left = 1560
TabIndex = 7
Top = 2640
Width = 975
End
Begin VB.TextBox Text3
Height = 375
Left = 1920
TabIndex = 6
Top = 1680
Width = 1575
End
Begin VB.TextBox Text2
Height = 375
Left = 1920
TabIndex = 4
Top = 960
Width = 1575
End
Begin VB.TextBox Text1
Height = 495
Left = 1920
TabIndex = 2
Top = 360
Width = 1575
End
Begin VB.Label Label5
Caption = "會員新號"
Height = 495
Left = 600
TabIndex = 10
Top = 2160
Width = 855
End
Begin VB.Label Label4
Caption = "余額"
Height = 375
Left = 600
TabIndex = 5
Top = 1800
Width = 975
End
Begin VB.Label Label3
Caption = "電話"
Height = 375
Left = 600
TabIndex = 3
Top = 1200
Width = 615
End
Begin VB.Label Label2
Caption = "姓名"
Height = 375
Left = 600
TabIndex = 1
Top = 600
Width = 975
End
Begin VB.Label Label1
Caption = "新會員基本信息"
BeginProperty Font
Name = "宋體"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 120
TabIndex = 0
Top = 120
Width = 2175
End
End
Attribute VB_Name = "form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim note As New ADODB.Recordset
Dim num As Integer
Private Sub Command1_Click()
Dim sql As String
sql = "select * from 會員表"
note.Open sql, cnn, 3, 2
note.AddNew
note.Fields("會員號").Value = Text4.Text
note.Fields("姓名").Value = Text1.Text
note.Fields("電話").Value = Text2.Text
note.Fields("余額").Value = Text3.Text
note.Update
MsgBox "提交成功!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
note.Close
Call Form_Load '調(diào)用會員號自動生成函數(shù)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim sql As String
Dim num As Integer
sql = "select * from 會員表"
note.Open sql, cnn, 3, 2
note.MoveLast
Me.Text4.Text = note.Fields("會員號").Value + 1 '自動生成新會員號
Text4.Locked = True '鎖定控件
note.Close
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -