?? frm按客戶編號查詢.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm按客戶編號查詢
Caption = "按客戶編號查詢"
ClientHeight = 3825
ClientLeft = 60
ClientTop = 405
ClientWidth = 5205
LinkTopic = "Form1"
ScaleHeight = 3825
ScaleWidth = 5205
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 1005
Left = 570
TabIndex = 2
Top = 945
Width = 4575
Begin VB.ComboBox Combo1
Height = 300
Left = 1800
Style = 2 'Dropdown List
TabIndex = 3
Top = 360
Width = 2535
End
Begin VB.Label Label1
Caption = "請輸入客戶編號"
Height = 420
Left = 285
TabIndex = 4
Top = 450
Width = 1560
End
End
Begin VB.CommandButton Command1
BackColor = &H00C0C0C0&
Caption = "查詢"
Height = 390
Left = 1335
Style = 1 'Graphical
TabIndex = 1
Top = 2265
Width = 1350
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 390
Left = 3015
Style = 1 'Graphical
TabIndex = 0
Top = 2265
Width = 1350
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 0
Top = 2700
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_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= 2
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "FILE NAME=D:\桌面\新建文件夾\客戶信息表.dsn"
OLEDBString = ""
OLEDBFile = "D:\桌面\新建文件夾\客戶信息表.dsn"
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 客戶信息表"
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.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 = 1140
TabIndex = 5
Top = 240
Width = 3390
End
End
Attribute VB_Name = "frm按客戶編號查詢"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
On Error Resume Next
frm主窗體.StatusBar1.Panels(1) = Me.Caption
' Data1.DatabaseName = App.Path & "\db2.mdb"
Adodc1.RecordSource = "select * from 客戶信息表"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
Combo1.AddItem (Adodc1.Recordset.Fields("客戶編號"))
Adodc1.Recordset.MoveNext
Loop
Else
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm主窗體.Enabled = True
frm主窗體.StatusBar1.Panels(1) = "楊揚工作室 作者:小楊"
End Sub
Private Sub Command1_Click()
On Error Resume Next
If Combo1.Text <> "" Then
main客戶查詢結果.Adodc1.RecordSource = "select * from 客戶信息表 where (客戶信息表.客戶編號 LIKE'%" + Combo1.Text + "%')"
main客戶查詢結果.Adodc1.Refresh
For i = 0 To 16
If main客戶查詢結果.Adodc1.Recordset.Fields(i) <> "" Then main客戶查詢結果.kh(i).Text = main客戶查詢結果.Adodc1.Recordset.Fields(i)
Next i
Unload Me
Load 客戶查詢結果
main客戶查詢結果.Show 1
Else
MsgBox "請輸入相應信息!"
End If
End Sub
Private Sub Command2_Click()
frm主窗體.Enabled = True
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -