📄 frm_czrk_cx.frm
字号:
VERSION 5.00
Begin VB.Form frm_CZRK_CX
BorderStyle = 3 'Fixed Dialog
Caption = "常住人口查询"
ClientHeight = 1170
ClientLeft = 45
ClientTop = 330
ClientWidth = 5595
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1170
ScaleWidth = 5595
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
Height = 300
Left = 4560
TabIndex = 6
Top = 840
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 300
Left = 3480
TabIndex = 5
Top = 840
Width = 975
End
Begin VB.Frame Frame1
Height = 735
Left = 120
TabIndex = 0
Top = 0
Width = 5415
Begin VB.TextBox Text1
Height = 300
Left = 3480
TabIndex = 4
Top = 240
Width = 1815
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frm_CZRK_CX.frx":0000
Left = 2520
List = "frm_CZRK_CX.frx":0016
Style = 2 'Dropdown List
TabIndex = 3
Top = 240
Width = 855
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frm_CZRK_CX.frx":0037
Left = 960
List = "frm_CZRK_CX.frx":006E
Style = 2 'Dropdown List
TabIndex = 2
Top = 240
Width = 1455
End
Begin VB.Label Label1
Caption = "查询条件"
Height = 255
Left = 120
TabIndex = 1
Top = 360
Width = 735
End
End
End
Attribute VB_Name = "frm_CZRK_CX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a
Dim i As Integer
Private Sub Combo2_Click()
If Combo2.Text <> " Like" Then
i = 0
ElseIf Combo2.Text = " Like" Then
i = 1
Else
End If
Text1.SetFocus
End Sub
Private Sub Command1_Click()
If Combo1.Text = "" Or Combo2.Text = "" Or Text1.Text = "" Then
MsgBox "输入或选择的信息不能为空", 32, "人口信息管理系统"
Else
If i = 0 Then
frm_CZRK_HKB.Adodc1.RecordSource = "select * from Table_HKB where " + Combo1.Text + " " + Combo2.Text + " '" + Text1.Text + "'"
frm_CZRK_HKB.Adodc1.Refresh
frm_CZRK_HKB.MS1.Visible = False
frm_CZRK_HKB.DataGrid1.Visible = True
ElseIf i = 1 Then
frm_CZRK_HKB.Adodc1.RecordSource = "select * from Table_HKB where " + Combo1.Text + " like '%" + Text1.Text + "%'"
frm_CZRK_HKB.Adodc1.Refresh
frm_CZRK_HKB.MS1.Visible = False
frm_CZRK_HKB.DataGrid1.Visible = True
Else
End If
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Command1_Click
Else
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -