📄 frmeditcustomer.frm
字号:
VERSION 5.00
Begin VB.Form frmEditCustomer
Caption = "客户信息修改"
ClientHeight = 4605
ClientLeft = 60
ClientTop = 345
ClientWidth = 3630
LinkTopic = "Form1"
ScaleHeight = 4605
ScaleWidth = 3630
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "--客户基本信息--"
Height = 3495
Left = 120
TabIndex = 9
Top = 120
Width = 3375
Begin VB.TextBox Text1
Height = 375
Left = 1200
TabIndex = 1
Top = 360
Width = 1935
End
Begin VB.TextBox Text2
Height = 375
Left = 1200
TabIndex = 2
Top = 864
Width = 1935
End
Begin VB.TextBox Text3
Height = 375
Left = 1200
TabIndex = 3
Top = 1368
Width = 1935
End
Begin VB.TextBox Text4
Height = 375
Left = 1200
TabIndex = 4
Top = 1872
Width = 1935
End
Begin VB.TextBox Text5
Height = 375
Left = 1200
TabIndex = 5
Top = 2376
Width = 1935
End
Begin VB.TextBox Text6
Height = 375
Left = 1200
TabIndex = 6
Top = 2880
Width = 1935
End
Begin VB.Label Label6
Caption = "备注"
Height = 255
Left = 360
TabIndex = 15
Top = 2880
Width = 615
End
Begin VB.Label Label5
Caption = "消费金额"
Height = 255
Left = 240
TabIndex = 14
Top = 2400
Width = 855
End
Begin VB.Label Label4
Caption = "联系地址"
Height = 255
Left = 240
TabIndex = 13
Top = 1920
Width = 855
End
Begin VB.Label Label3
Caption = "联系电话"
Height = 255
Left = 240
TabIndex = 12
Top = 1440
Width = 855
End
Begin VB.Label Label2
Caption = "客户名称"
Height = 255
Left = 240
TabIndex = 11
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "客户卡号"
Height = 255
Left = 240
TabIndex = 10
Top = 360
Width = 855
End
End
Begin VB.Frame Frame2
Caption = "--客户信息修改--"
Height = 735
Left = 120
TabIndex = 0
Top = 3720
Width = 3375
Begin VB.CommandButton Command1
Caption = "确认"
Height = 375
Left = 360
TabIndex = 7
Top = 240
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 1920
TabIndex = 8
Top = 240
Width = 1095
End
End
End
Attribute VB_Name = "frmEditCustomer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim rdst As New ADODB.Recordset
rdst.Open "update customers set 客户名称='" & Text2.Text & "',联系电话='" & Text3.Text & "',联系地址='" & Text4.Text & "',消费金额='" & Text5.Text & "',备注='" & Text6.Text & "'where 客户卡号='" & Text1.Text & "'", g_conn
MsgBox "修改完成"
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim rdst As New ADODB.Recordset
rdst.Open "select * from customers where 客户卡号='" & editkhkh & "'", g_conn
If rdst.EOF = True Then
MsgBox "无此客户卡号" & editkhkh
Else
Text1.Text = rdst!客户卡号
Text2.Text = rdst!客户名称
Text3.Text = rdst!联系电话
Text4.Text = rdst!联系地址
Text5.Text = rdst!消费金额
Text6.Text = rdst!备注
End If
Text1.Enabled = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -