📄 frmselectbyid.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmSelectByID
BackColor = &H80000013&
BorderStyle = 3 'Fixed Dialog
Caption = "按编号查找"
ClientHeight = 1215
ClientLeft = 5730
ClientTop = 4485
ClientWidth = 2505
Icon = "FrmSelectByID.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1215
ScaleWidth = 2505
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command2
Caption = "退出"
Height = 285
Left = 1440
TabIndex = 4
Top = 855
Width = 870
End
Begin VB.CommandButton Command1
Caption = "查找"
Default = -1 'True
Height = 285
Left = 180
TabIndex = 3
Top = 855
Width = 870
End
Begin VB.Frame Frame1
BackColor = &H80000013&
Height = 780
Left = 45
TabIndex = 0
Top = 0
Width = 2400
Begin MSAdodcLib.Adodc AdoSelByID
Height = 330
Left = -945
Top = 0
Visible = 0 'False
Width = 1275
_ExtentX = 2249
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.TextBox Text1
Height = 285
Left = 765
TabIndex = 1
Top = 270
Width = 1275
End
Begin VB.Label Label1
BackColor = &H80000013&
Caption = "编号"
Height = 240
Left = 270
TabIndex = 2
Top = 315
Width = 465
End
End
End
Attribute VB_Name = "FrmSelectByID"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
' FrmInfo.AdoQuery2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\mgydb.mdb;Persist Security Info=False"
' FrmInfo.AdoQuery2.CommandType = adCmdText
SearchStr2 = "select * from mgydb where 编号='" & Text1.Text & "'"
FrmInfo2.AdoQuery2.RecordSource = SearchStr2
FrmInfo2.AdoQuery2.Refresh
If FrmInfo2.AdoQuery2.Recordset.EOF = False Then
FrmInfo2.Show
' Me.Hide
Unload Me
Else
MsgBox "没有查到符合条件的记录,请查证编号的正确性!", vbInformation + vbOKOnly, "提示"
FrmQuery.Show
End If
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -