📄 main_mcdialog.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_mcdialog
BorderStyle = 3 'Fixed Dialog
Caption = "按客户全称查询"
ClientHeight = 2865
ClientLeft = 1410
ClientTop = 2805
ClientWidth = 5955
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2865
ScaleWidth = 5955
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 0
Top = 600
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=khgl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from kh"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 390
Left = 3135
Style = 1 'Graphical
TabIndex = 4
Top = 2325
Width = 1350
End
Begin VB.CommandButton Command1
BackColor = &H00C0C0C0&
Caption = "查询"
Height = 390
Left = 1455
Style = 1 'Graphical
TabIndex = 3
Top = 2325
Width = 1350
End
Begin VB.Frame Frame1
Height = 1005
Left = 690
TabIndex = 0
Top = 1005
Width = 4575
Begin VB.TextBox Text1
Height = 360
Left = 1605
TabIndex = 5
Top = 360
Width = 2835
End
Begin VB.Label Label1
Caption = "请输入客户全称"
Height = 420
Left = 285
TabIndex = 1
Top = 450
Width = 1560
End
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "按客户全称查询"
BeginProperty Font
Name = "宋体"
Size = 24
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 570
Left = 1260
TabIndex = 2
Top = 300
Width = 3390
End
End
Attribute VB_Name = "main_mcdialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub Command1_Click()
Dim i As Integer
If Text1.Text <> "" Then
main_khcxjg.Adodc1.RecordSource = "select * from kh where (kh.客户全称 LIKE '%" + Text1.Text + "%')"
main_khcxjg.Adodc1.Refresh
If main_khcxjg.Adodc1.Recordset.RecordCount > 0 Then
For i = 0 To 16
If main_khcxjg.Adodc1.Recordset.Fields(i) <> "" Then main_khcxjg.kh(i).Text = main_khcxjg.Adodc1.Recordset.Fields(i)
Next i
Unload Me
Load main_khcxjg
main_khcxjg.Show 1
Else
MsgBox "无记录!"
End If
Else
MsgBox "请输入相应信息!"
End If
End Sub
Private Sub Command2_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -