?? spseek.frm
字號:
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text31.Locked = True
Text32.Locked = True
Combo1.Locked = True
End Sub
Private Sub Image4_Click()
Dim a As String
a = Combo1.Text
Image4.Picture = Image1.Picture
Image3.Picture = Image2.Picture
Label3.Caption = a
'Command1.Enabled = True
'Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = True
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text21.BackColor = &HFFFFFF
Text22.BackColor = &HFFFFFF
Text23.BackColor = &HFFFFFF
Text24.BackColor = &HFFFFFF
Text25.BackColor = &HFFFFFF
Text26.BackColor = &HFFFFFF
Text27.BackColor = &HFFFFFF
Text28.BackColor = &HFFFFFF
Text29.BackColor = &HFFFFFF
Text30.BackColor = &HFFFFFF
Text31.Locked = False
Text32.Locked = False
Combo1.Locked = False
End Sub
Private Sub Command1_Click()
On Error GoTo a0
Dim c
Dim r As Integer, i As Integer
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Dim a As String, b As String, e As String
a = Combo1.Text
b = Text31.Text
e = Text32.Text
Label3.Caption = a
If Text31.Text = "" Then
MsgBox "請輸入查找條件"
Text31.SetFocus
Exit Sub
End If
c = Combo1.Text & "< #" & Text31.Text & "# and " & Combo1.Text & "> #" & Text32.Text & "#"
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 '("出生日期 < #70-1-1# and 出生日期 > #60-1-1#")
If Data1.Recordset.NoMatch Then
Command1.Enabled = False
Command2.Enabled = True
MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Exit Sub
Else
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text19.Text = Data1.Recordset("職工編號")
Text20.Text = Data1.Recordset("職工姓名")
Text30.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text17.Text = Data1.Recordset("職工編號")
Text18.Text = Data1.Recordset("職工姓名")
Text29.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text15.Text = Data1.Recordset("職工編號")
Text16.Text = Data1.Recordset("職工姓名")
Text28.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text13.Text = Data1.Recordset("職工編號")
Text14.Text = Data1.Recordset("職工姓名")
Text27.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text11.Text = Data1.Recordset("職工編號")
Text12.Text = Data1.Recordset("職工姓名")
Text26.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text9.Text = Data1.Recordset("職工編號")
Text10.Text = Data1.Recordset("職工姓名")
Text25.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text7.Text = Data1.Recordset("職工編號")
Text8.Text = Data1.Recordset("職工姓名")
Text24.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text5.Text = Data1.Recordset("職工編號")
Text6.Text = Data1.Recordset("職工姓名")
Text23.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text3.Text = Data1.Recordset("職工編號")
Text4.Text = Data1.Recordset("職工姓名")
Text22.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
Exit Sub
Else
Text1.Text = Data1.Recordset("職工編號")
Text2.Text = Data1.Recordset("職工姓名")
Text21.Text = Data1.Recordset(a)
reco = reco - 1
End If
Data1.Recordset.FindPrevious c
If Data1.Recordset.NoMatch Then
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command1.Enabled = False
Command2.Enabled = True
reco = 0
Y = 1
Exit Sub
Else
Data1.Recordset.FindNext c
z = 1
End If
If Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
reco = 0
Command1.Enabled = False
Command2.Enabled = True
End If
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
Exit Sub
MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
a0:
End Sub
Private Sub Command2_Click()
On Error GoTo a0
Dim c
Dim i As Integer, r As Integer
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Dim a As String, b As String, e As String
a = Combo1.Text
b = Text31.Text
e = Text32.Text
Label3.Caption = a
If Text31.Text = "" Then
MsgBox "請輸入查找條件"
Text31.SetFocus
Exit Sub
End If
c = Combo1.Text & "< #" & Text31.Text & "# and " & Combo1.Text & "> #" & Text32.Text & "#"
If Y = 1 Then
For i = 1 To 9
Data1.Recordset.FindNext c
Next i
Y = 0
Else
If z = 1 Then
For i = 1 To 9
Data1.Recordset.FindNext c
Next i
End If
End If
Data1.Recordset.FindNext c '("出生日期 < #70-1-1# and 出生日期 > #60-1-1#")
If Data1.Recordset.NoMatch Then
Command2.Enabled = False
Command1.Enabled = True
MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Exit Sub
Else
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""
Text19.Text = ""
Text20.Text = ""
Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text25.Text = ""
Text26.Text = ""
Text27.Text = ""
Text28.Text = ""
Text29.Text = ""
Text30.Text = ""
Text1.Text = Data1.Recordset("職工編號")
Text2.Text = Data1.Recordset("職工姓名")
Text21.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command2.Enabled = False
Command1.Enabled = True
X = 1
Command1.SetFocus
Exit Sub
Else
Text3.Text = Data1.Recordset("職工編號")
Text4.Text = Data1.Recordset("職工姓名")
Text22.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command2.Enabled = False
Command1.Enabled = True
X = 1
Command1.SetFocus
Exit Sub
Else
Text5.Text = Data1.Recordset("職工編號")
Text6.Text = Data1.Recordset("職工姓名")
Text23.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command2.Enabled = False
Command1.Enabled = True
X = 1
Command1.SetFocus
Exit Sub
Else
Text7.Text = Data1.Recordset("職工編號")
Text8.Text = Data1.Recordset("職工姓名")
Text24.Text = Data1.Recordset(a)
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
'MsgBox "找不到與條件相符的記錄", vbOKOnly, "提示信息"
Command2.Enabled = False
Command1.Enabled = True
X = 1
Command1.SetFocus
Exit Sub
Else
Text9.Text = Data1.Recordset("職工編號")
Text10.Text = Data1.Recordset("職工姓名")
Text25.Text = Data1.Recordset(a)
reco = reco + 1
End If
If Data1.Recordset.BOF Then
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -