📄 khxx.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form khxx
Caption = "客户信息"
ClientHeight = 9705
ClientLeft = 1395
ClientTop = 1815
ClientWidth = 14955
Icon = "khxx.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 9705
ScaleWidth = 14955
WindowState = 2 'Maximized
Begin VB.CommandButton Command2
Caption = "添加(&T)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4680
TabIndex = 8
Top = 8880
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "修改(&X)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6240
TabIndex = 7
Top = 8880
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "删除(&S)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 7800
TabIndex = 6
Top = 8880
Width = 1095
End
Begin VB.CommandButton Command5
Caption = "打印(&D)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 9360
TabIndex = 5
Top = 8880
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "退出(&E)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 10920
TabIndex = 4
Top = 8880
Width = 1095
End
Begin VB.CommandButton Command6
Caption = "查询(&C)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3000
TabIndex = 3
Top = 8880
Width = 1095
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 1680
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2040
Visible = 0 'False
Width = 2175
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 495
Left = 0
TabIndex = 2
Top = 9210
Width = 14955
_ExtentX = 26379
_ExtentY = 873
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 14235
MinWidth = 5080
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 5080
MinWidth = 5080
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 6456
MinWidth = 6456
EndProperty
EndProperty
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid
Bindings = "khxx.frx":0442
Height = 8175
Left = 240
TabIndex = 0
Top = 360
Width = 14895
_ExtentX = 26273
_ExtentY = 14420
_Version = 393216
Rows = 20
Cols = 7
BackColor = -2147483624
ForeColor = -2147483642
ForeColorFixed = 0
BackColorSel = 64
ForeColorSel = 16777215
BackColorBkg = 16777215
WordWrap = -1 'True
FocusRect = 2
GridLines = 3
AllowUserResizing= 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Frame Frame1
Height = 8535
Left = 120
TabIndex = 1
Top = 120
Width = 15100
End
End
Attribute VB_Name = "khxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public c As Integer
Public strfind As String
Public dj As Integer
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
tjkh.Show
End Sub
Private Sub Command3_Click()
If dj = 1 Then
strfind = khxx.MSFlexGrid.TextMatrix(c, 1)
On Error GoTo endthis
xgkhxx.Data1.Recordset.FindFirst "dwbh = " & "'" & strfind & "'"
xgkhxx.Show
Unload Me
Else
MsgBox "请先选好要修改的商品。", vbInformation, "提示"
Exit Sub
End If
endthis:
Exit Sub
'xgkhxx.Show
End Sub
Private Sub Command4_Click()
strfind = khxx.MSFlexGrid.TextMatrix(c, 1)
On Error GoTo endthis
If dj = 1 Then
khxx.Data1.Recordset.FindFirst "dwbh = " & "'" & strfind & "'"
'****************************************************
Msg = "确实要删除此记录吗?" ' 定义信息。
Style = vbYesNo + vbCritical + vbDefaultButton2 ' 定义按钮。
Title = "提示" ' 定义标题。
Ctxt = 1000 ' 定义标题
' 上下文。
' 显示信息。
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' 用户按下“是”。
MyString = "Yes" ' 完成某操作。
'czrygl.Data1.Recordset.MoveNext
'On Error GoTo endthis
khxx.Data1.Recordset.Delete
khxx.Data1.Refresh
khxx.Hide
Call Form_Activate
khxx.Show
Else ' 用户按下“否”。
MyString = "No" ' 完成某操作。
End If
'****************************************************
Else
MsgBox "请先选好要删除的职员", vbInformation, "提示"
End If
endthis:
Exit Sub
End Sub
Private Sub Command6_Click()
Me.Hide
xzkh.Show
End Sub
Private Sub Form_Activate()
MSFlexGrid.TextMatrix(0, 1) = " 客户编号"
MSFlexGrid.TextMatrix(0, 2) = " 客户名称"
MSFlexGrid.TextMatrix(0, 3) = " 客户类型"
MSFlexGrid.TextMatrix(0, 4) = " 联系电话"
MSFlexGrid.TextMatrix(0, 5) = " 联系人"
MSFlexGrid.TextMatrix(0, 6) = " 地址"
MSFlexGrid.TextMatrix(0, 7) = " 备注"
MSFlexGrid.ColWidth(0) = 200
MSFlexGrid.ColWidth(1) = 1200
MSFlexGrid.ColWidth(2) = 2000
MSFlexGrid.ColWidth(3) = 1800
MSFlexGrid.ColWidth(5) = 2000
MSFlexGrid.ColWidth(6) = 1200
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\db1.mdb"
Data1.RecordSource = "select * from wldw"
MSFlexGrid.ColWidth(0) = 200
End Sub
Private Sub MSFlexGrid_Click()
c = khxx.MSFlexGrid.Row
dj = 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -