📄 dq.frm
字号:
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 495
Left = 480
TabIndex = 5
Top = 840
Width = 855
End
Begin VB.Menu mnuquit
Caption = "退出(&Q)"
End
End
Attribute VB_Name = "Form12"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim reco As Integer, X As Integer, Y As Integer, z As Integer
Private Sub Command1_Click()
On Error GoTo a0
Dim a As String, b As String, c As String
a = Combo1.Text
Command2.Enabled = False
Command3.Enabled = False
If Combo1.Text = "" Then
MsgBox "请输入查找条件"
Combo1.SetFocus
Exit Sub
End If
Label9.Caption = ""
Label10.Caption = ""
Label11.Caption = ""
Label12.Caption = ""
Label13.Caption = ""
Label14.Caption = ""
Label15.Caption = ""
Label16.Caption = ""
Label17.Caption = ""
Label18.Caption = ""
Label19.Caption = ""
Label20.Caption = ""
Label21.Caption = ""
Label22.Caption = ""
Label23.Caption = ""
Label24.Caption = ""
Label25.Caption = ""
Label26.Caption = ""
Label27.Caption = ""
Label28.Caption = ""
Label29.Caption = ""
Label30.Caption = ""
Label31.Caption = ""
Label32.Caption = ""
Label33.Caption = ""
Label34.Caption = ""
Label35.Caption = ""
Label36.Caption = ""
Label37.Caption = ""
Label38.Caption = ""
Label39.Caption = ""
Label40.Caption = ""
Label41.Caption = ""
Label42.Caption = ""
Label43.Caption = ""
Label44.Caption = ""
Label45.Caption = ""
Label46.Caption = ""
Label47.Caption = ""
Label48.Caption = ""
Label49.Caption = ""
Label50.Caption = ""
Label51.Caption = ""
Label52.Caption = ""
Label53.Caption = ""
Label54.Caption = ""
Label55.Caption = ""
Label56.Caption = ""
Label57.Caption = ""
Label58.Caption = ""
Label59.Caption = ""
Label60.Caption = ""
Label61.Caption = ""
Label62.Caption = ""
Label63.Caption = ""
Label64.Caption = ""
Label65.Caption = ""
Label66.Caption = ""
Label67.Caption = ""
Label68.Caption = ""
Label69.Caption = ""
a = Combo1.Text
c = "部门 Like '" & a & "'"
Data1.Recordset.FindFirst c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label9.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label29.Caption = Data1.Recordset("职工姓名")
Label39.Caption = Data1.Recordset("性别")
Label49.Caption = Data1.Recordset("部门")
Label59.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label69.Caption = Data2.Recordset("实发工资")
reco = 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label10.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label28.Caption = Data1.Recordset("职工姓名")
Label38.Caption = Data1.Recordset("性别")
Label48.Caption = Data1.Recordset("部门")
Label58.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label68.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label11.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label27.Caption = Data1.Recordset("职工姓名")
Label37.Caption = Data1.Recordset("性别")
Label47.Caption = Data1.Recordset("部门")
Label57.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label67.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label12.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label26.Caption = Data1.Recordset("职工姓名")
Label36.Caption = Data1.Recordset("性别")
Label46.Caption = Data1.Recordset("部门")
Label56.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label66.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label13.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label25.Caption = Data1.Recordset("职工姓名")
Label35.Caption = Data1.Recordset("性别")
Label45.Caption = Data1.Recordset("部门")
Label55.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label65.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label14.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label24.Caption = Data1.Recordset("职工姓名")
Label34.Caption = Data1.Recordset("性别")
Label44.Caption = Data1.Recordset("部门")
Label54.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label64.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label15.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label23.Caption = Data1.Recordset("职工姓名")
Label33.Caption = Data1.Recordset("性别")
Label43.Caption = Data1.Recordset("部门")
Label53.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label63.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label16.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label22.Caption = Data1.Recordset("职工姓名")
Label32.Caption = Data1.Recordset("性别")
Label42.Caption = Data1.Recordset("部门")
Label52.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label62.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label17.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label21.Caption = Data1.Recordset("职工姓名")
Label31.Caption = Data1.Recordset("性别")
Label41.Caption = Data1.Recordset("部门")
Label51.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label61.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindNext c
If Data1.Recordset.NoMatch Then
Exit Sub
Else
Label18.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label19.Caption = Data1.Recordset("职工姓名")
Label30.Caption = Data1.Recordset("性别")
Label40.Caption = Data1.Recordset("部门")
Label50.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label60.Caption = Data2.Recordset("实发工资")
reco = reco + 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Command3.Enabled = True
Combo1.Locked = True
z = 0
Exit Sub
a0:
MsgBox "找不到与条件相符的记录", vbOKOnly, "提示信息"
End Sub
Private Sub Command2_Click()
On Error GoTo a0
Dim a As String, b As String, c As String
Dim i As Integer, r As Integer
a = Combo1.Text
If Combo1.Text = "" Then
MsgBox "请输入查找条件"
Combo1.SetFocus
Exit Sub
End If
Label9.Caption = ""
Label10.Caption = ""
Label11.Caption = ""
Label12.Caption = ""
Label13.Caption = ""
Label14.Caption = ""
Label15.Caption = ""
Label16.Caption = ""
Label17.Caption = ""
Label18.Caption = ""
Label19.Caption = ""
Label20.Caption = ""
Label21.Caption = ""
Label22.Caption = ""
Label23.Caption = ""
Label24.Caption = ""
Label25.Caption = ""
Label26.Caption = ""
Label27.Caption = ""
Label28.Caption = ""
Label29.Caption = ""
Label30.Caption = ""
Label31.Caption = ""
Label32.Caption = ""
Label33.Caption = ""
Label34.Caption = ""
Label35.Caption = ""
Label36.Caption = ""
Label37.Caption = ""
Label38.Caption = ""
Label39.Caption = ""
Label40.Caption = ""
Label41.Caption = ""
Label42.Caption = ""
Label43.Caption = ""
Label44.Caption = ""
Label45.Caption = ""
Label46.Caption = ""
Label47.Caption = ""
Label48.Caption = ""
Label49.Caption = ""
Label50.Caption = ""
Label51.Caption = ""
Label52.Caption = ""
Label53.Caption = ""
Label54.Caption = ""
Label55.Caption = ""
Label56.Caption = ""
Label57.Caption = ""
Label58.Caption = ""
Label59.Caption = ""
Label60.Caption = ""
Label61.Caption = ""
Label62.Caption = ""
Label63.Caption = ""
Label64.Caption = ""
Label65.Caption = ""
Label66.Caption = ""
Label67.Caption = ""
Label68.Caption = ""
Label69.Caption = ""
a = Combo1.Text
c = "部门 Like '" & a & "'"
If X = 1 Then
r = (reco - 1) Mod 10
If (reco Mod 10) = 0 Then
r = 9
End If
For i = 1 To r
Data1.Recordset.FindPrevious c
Next i
X = 0
Else
If z = 0 Then
For i = 1 To 9
Data1.Recordset.FindPrevious c
Next i
End If
End If
Data1.Recordset.FindPrevious c
If Data1.Recordset.NoMatch Then
Command2.Enabled = False
Command3.Enabled = True
Exit Sub
Else
Label18.Caption = Data1.Recordset("职工编号")
b = Data1.Recordset("职工编号")
Label19.Caption = Data1.Recordset("职工姓名")
Label30.Caption = Data1.Recordset("性别")
Label40.Caption = Data1.Recordset("部门")
Label50.Caption = Data1.Recordset("职务")
b = "职工编号 Like '" & b & "'"
Data2.Recordset.FindFirst b
Label60.Caption = Data2.Recordset("实发工资")
reco = reco - 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Data1.Recordset.FindPrevious c
If Data1.Recordset.NoMatch Then
Command2.Enabled = False
Command3.Enabled = True
Exit Sub
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -