📄 frmgkdaxg.frm
字号:
VERSION 5.00
Begin VB.Form FrmGKDAXG
BorderStyle = 1 'Fixed Single
Caption = "顾客档案修改"
ClientHeight = 4815
ClientLeft = 45
ClientTop = 435
ClientWidth = 5505
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4815
ScaleWidth = 5505
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 4320
TabIndex = 12
Top = 4320
Width = 855
End
Begin VB.CommandButton Command1
Caption = "保 存"
Height = 375
Left = 3000
TabIndex = 11
Top = 4320
Width = 855
End
Begin VB.TextBox TxtBZ
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 615
Left = 1080
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 10
Top = 3540
Width = 4215
End
Begin VB.TextBox TxtTele
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 9
Top = 1680
Width = 4215
End
Begin VB.TextBox TxtGJSJ
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 8
Top = 2160
Width = 1575
End
Begin VB.TextBox TxtAddress
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 7
Top = 720
Width = 4215
End
Begin VB.TextBox TxtName
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 6
Top = 240
Width = 4215
End
Begin VB.TextBox TxtSGDZ
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 5
Top = 1200
Width = 4215
End
Begin VB.TextBox TxtZJBH
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 3720
TabIndex = 4
Top = 2160
Width = 1575
End
Begin VB.TextBox TxtFDJH
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 3
Top = 2640
Width = 1575
End
Begin VB.TextBox TxtDHH
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 3720
TabIndex = 2
Top = 2640
Width = 1575
End
Begin VB.TextBox TxtBXQ
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 1080
TabIndex = 1
Top = 3120
Width = 1575
End
Begin VB.TextBox TxtZSY
Appearance = 0 'Flat
ForeColor = &H00FF8080&
Height = 270
Left = 3720
TabIndex = 0
Top = 3120
Width = 1575
End
Begin VB.Label Label18
Caption = "备注:"
ForeColor = &H00FF0000&
Height = 255
Left = 240
TabIndex = 23
Top = 3720
Width = 615
End
Begin VB.Label Label14
Caption = "购机时间:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 22
Top = 2160
Width = 975
End
Begin VB.Label Label13
Caption = "电话:"
ForeColor = &H00FF0000&
Height = 255
Left = 240
TabIndex = 21
Top = 1680
Width = 615
End
Begin VB.Label Label12
Caption = "单位地址:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 20
Top = 720
Width = 975
End
Begin VB.Label Label11
Caption = "顾客姓名:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 19
Top = 240
Width = 975
End
Begin VB.Label Label1
Caption = "施工地址:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 18
Top = 1200
Width = 975
End
Begin VB.Label Label2
Caption = "整机编号:"
ForeColor = &H00FF0000&
Height = 255
Left = 2760
TabIndex = 17
Top = 2160
Width = 975
End
Begin VB.Label Label3
Caption = "发动机号:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 16
Top = 2640
Width = 975
End
Begin VB.Label Label4
Caption = "订货号:"
ForeColor = &H00FF0000&
Height = 255
Left = 2880
TabIndex = 15
Top = 2640
Width = 855
End
Begin VB.Label Label5
Caption = "保修期:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 14
Top = 3120
Width = 975
End
Begin VB.Label Label6
Caption = "赠送油:"
ForeColor = &H00FF0000&
Height = 255
Left = 2880
TabIndex = 13
Top = 3120
Width = 855
End
End
Attribute VB_Name = "FrmGKDAXG"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If TxtName.Text = "" Then
MsgBox "请填写顾客姓名!"
Exit Sub
End If
If TxtAddress.Text = "" Then
MsgBox "请填写单位地址!"
Exit Sub
End If
If TxtTele.Text = "" Then
MsgBox "请填写顾客电话!"
Exit Sub
End If
If TxtGJSJ.Text = "" Then
MsgBox "请填写购机时间!"
Exit Sub
End If
If TxtZJBH.Text = "" Then
MsgBox "请填写整机编号!"
Exit Sub
End If
If TxtFDJH.Text = "" Then
MsgBox "请填写发动机号!"
Exit Sub
End If
If TxtDHH.Text = "" Then
MsgBox "请填写订货号!"
Exit Sub
End If
Make_Add
FrmGKDA.Show
Unload Me
End Sub
Private Sub Command2_Click()
FrmGKDA.Show
Unload Me
End Sub
Private Sub Form_Load()
Me.Top = MDIFrmMain.Height / 2 - Me.Height / 2 - 1000
Me.Left = MDIFrmMain.Width / 2 - Me.Width / 2
Set Rs = New Recordset
Set_Int
End Sub
Private Sub Set_Int()
'On Error GoTo DataErr
sSql = "SELECT * FROM 顾客表 where ID =" & RemId
Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
TxtName.Text = Rs!顾客姓名
TxtAddress.Text = Rs!单位地址
TxtSGDZ.Text = Rs!施工地址
TxtTele.Text = Rs!电话
TxtGJSJ.Text = Rs!购机时间
TxtZJBH.Text = Rs!整机编号
TxtFDJH.Text = Rs!发动机号
TxtDHH.Text = Rs!订货号
TxtZSY.Text = Rs!赠送油
TxtBXQ.Text = Rs!保修期
If Rs.Fields("备注") = "-" Then TxtBZ.Text = "" Else TxtBZ.Text = Rs.Fields("备注")
Rs.Close
' Exit Sub
'DataErr:
' MsgBox Err.Description
End Sub
Private Sub Make_Add()
sSql = "SELECT * FROM 顾客表 where ID =" & RemId
Rs.Open sSql, db, adOpenKeyset, adLockOptimistic, adCmdText
Rs!顾客姓名 = TxtName.Text
Rs!单位地址 = TxtAddress.Text
Rs!施工地址 = TxtSGDZ.Text
Rs!电话 = TxtTele.Text
Rs!购机时间 = TxtGJSJ.Text
Rs!整机编号 = TxtZJBH.Text
Rs!发动机号 = TxtFDJH.Text
Rs!订货号 = TxtDHH.Text
Rs!赠送油 = TxtZSY.Text
Rs!保修期 = TxtBXQ.Text
If TxtBZ.Text = "" Then Rs!备注 = "-" Else Rs!备注 = TxtBZ.Text
Rs.Update
Rs.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -