?? formview.frm
字號:
Formsub.DataCombo4.Enabled = True
Formsub.Label8.Enabled = True '''''保管期限:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo5.Enabled = True
Formsub.Label9.Enabled = True '存放地點(diǎn):
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox1.Enabled = True
Formsub.Label6.Enabled = True '''''''''''案卷頁數(shù):
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox2.Enabled = True
Formsub.Label11.Enabled = True '案卷內(nèi)容簡介:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox3.Enabled = True
Formsub.Label14.Enabled = True '檔案號:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox4.Enabled = True
Formsub.Label13.Enabled = True '案卷順序號:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox5.Enabled = True
Formsub.Label2.Enabled = True '案卷標(biāo)題:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox6.Enabled = True
Formsub.Label4.Enabled = True '''''''''''''課題負(fù)責(zé)人:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox7.Enabled = True
Formsub.Label5.Enabled = True ''''''''''''案卷標(biāo)題的主題詞:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox8.Enabled = True
Formsub.Label10.Enabled = True '''''''備注:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.MaskEdBox1.Text = Format(Now, "yyyy年mm月dd日")
Else
tiaojian = "where"
End If
'''''''''''''''''''''''''''''''''''''''
If Me.Check2.Value = 1 Then
Formsub.MaskEdBox1.Enabled = False
Formsub.Label1.Enabled = False
If InStr(Me.MaskEdBox1.Text, "?") = 0 And InStr(Me.MaskEdBox2.Text, "?") = 0 Then
tiao2 = " [歸檔日期] " + " <= " + " '" & Me.MaskEdBox2.Text & "'" + " and " + " [歸檔日期] " + " >= " + " '" & Me.MaskEdBox1.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao2
Else
tiaojian = tiaojian + " and " + tiao2
End If
Else
Formsub.MaskEdBox1.Enabled = True
Formsub.Label1.Enabled = True
MsgBox "請準(zhǔn)確輸入時間段!", , "注意:"
GoTo e1:
End If
End If
''''''''''''''''''''''''''''''''''''''''
If Me.Check3.Value = 1 Then
Formsub.TextBox3.Enabled = False
Formsub.Label14.Enabled = False '檔案號:
If Trim(TextBox3.Text) <> "" Then
tiao3 = " [檔案號] " + " like " + "'" & Me.TextBox3.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao3
Else
tiaojian = tiaojian + " and " + tiao3
End If
Else
Formsub.TextBox3.Enabled = True
Formsub.Label14.Enabled = True '檔案號:
MsgBox "您已選擇了“檔案號”,但沒輸入內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''
If Me.Check4.Value = 1 Then
Formsub.TextBox4.Enabled = False
Formsub.Label13.Enabled = False '案卷順序號:
If Trim(TextBox4.Text) <> "" Then
tiao4 = " [案卷順序號] " + " like " + "'" & Me.TextBox4.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao4
Else
tiaojian = tiaojian + " and " + tiao4
End If
Else
Formsub.TextBox4.Enabled = True
Formsub.Label13.Enabled = True '案卷順序號:
MsgBox "您已選擇了“案卷順序號”,但沒輸入內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''
If Me.Check5.Value = 1 Then
Formsub.TextBox5.Enabled = False
Formsub.Label2.Enabled = False '案卷標(biāo)題:
If Trim(TextBox5.Text) <> "" Then
tiao5 = " [案卷標(biāo)題] " + " like " + "'" & Me.TextBox5.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao5
Else
tiaojian = tiaojian + " and " + tiao5
End If
Else
Formsub.TextBox5.Enabled = True
Formsub.Label2.Enabled = True '案卷標(biāo)題:
MsgBox "您已選擇了“案卷標(biāo)題”,但沒輸入內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''
If Me.Check6.Value = 1 Then
Formsub.DataCombo1.Enabled = False
Formsub.Label12.Enabled = False '''''''''''''''''檔案類型:
If Trim(Me.DataCombo1.Text) <> "" Then
tiao6 = " [檔案類型] " + " = " + "'" & Me.DataCombo1.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao6
Else
tiaojian = tiaojian + " and " + tiao6
End If
Else
Formsub.DataCombo1.Enabled = True
Formsub.Label12.Enabled = True '''''''''''''''''檔案類型:
MsgBox "您已選擇了“檔案類型”,但沒選擇內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''
If Me.Check7.Value = 1 Then
Formsub.DataCombo2.Enabled = False
Formsub.Label3.Enabled = False ''''''''''''''''''立卷單位:
If Trim(Me.DataCombo2.Text) <> "" Then
tiao7 = " [立卷單位] " + " = " + "'" & Me.DataCombo2.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao7
Else
tiaojian = tiaojian + " and " + tiao7
End If
Else
Formsub.DataCombo2.Enabled = True
Formsub.Label3.Enabled = True ''''''''''''''''''立卷單位:
MsgBox "您已選擇了“立卷單位”,但沒選擇內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''
If Me.Check8.Value = 1 Then
Formsub.TextBox6.Enabled = False
Formsub.Label4.Enabled = False '''''''''''''課題負(fù)責(zé)人:
If Trim(TextBox6.Text) <> "" Then
tiao8 = " [課題負(fù)責(zé)人] " + " like " + "'" & Me.TextBox6.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao8
Else
tiaojian = tiaojian + " and " + tiao8
End If
Else
Formsub.TextBox6.Enabled = True
Formsub.Label4.Enabled = True '''''''''''''課題負(fù)責(zé)人:
MsgBox "您已選擇了“課題負(fù)責(zé)人”,但沒輸入內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''
If Me.Check9.Value = 1 Then
Formsub.TextBox7.Enabled = False
Formsub.Label5.Enabled = False ''''''''''''案卷標(biāo)題的主題詞:
If Trim(TextBox7.Text) <> "" Then
tiao9 = " [案卷標(biāo)題的主題詞] " + " like " + "'" & Me.TextBox7.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao9
Else
tiaojian = tiaojian + " and " + tiao9
End If
Else
Formsub.TextBox7.Enabled = True
Formsub.Label5.Enabled = True ''''''''''''案卷標(biāo)題的主題詞:
MsgBox "您已選擇了“案卷標(biāo)題的主題詞”,但沒輸入內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''
If Me.Check10.Value = 1 Then
Formsub.DataCombo3.Enabled = False
Formsub.Label7.Enabled = False ''''''''保密等級:
If Trim(Me.DataCombo3.Text) <> "" Then
tiao10 = " [密級] " + " = " + "'" & Me.DataCombo3.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao10
Else
tiaojian = tiaojian + " and " + tiao10
End If
Else
Formsub.DataCombo3.Enabled = True
Formsub.Label7.Enabled = True ''''''''保密等級:
MsgBox "您已選擇了“保密等級”,但沒選擇內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''
If Me.Check11.Value = 1 Then
Formsub.DataCombo4.Enabled = False
Formsub.Label8.Enabled = False '''''保管期限:
If Trim(Me.DataCombo4.Text) <> "" Then
tiao11 = " [保管期限] " + " = " + "'" & Me.DataCombo4.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao11
Else
tiaojian = tiaojian + " and " + tiao11
End If
Else
Formsub.DataCombo4.Enabled = True
Formsub.Label8.Enabled = True '''''保管期限:
MsgBox "您已選擇了“保管期限”,但沒選擇內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''
If Me.Check12.Value = 1 Then
Formsub.DataCombo5.Enabled = False
Formsub.Label9.Enabled = False '存放地點(diǎn):
If Trim(Me.DataCombo5.Text) <> "" Then
tiao12 = " [存放地點(diǎn)] " + " = " + "'" & Me.DataCombo5.Text & "'"
If Len(tiaojian) = 5 Then
tiaojian = tiaojian + tiao12
Else
tiaojian = tiaojian + " and " + tiao12
End If
Else
Formsub.DataCombo5.Enabled = True
Formsub.Label9.Enabled = True '存放地點(diǎn):
MsgBox "您已選擇了“存放地點(diǎn)”,但沒選擇內(nèi)容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''
Formlist.Adodc1.RecordSource = "select * from [檔案] " + tiaojian
Formlist.Adodc1.Refresh
If Formlist.Adodc1.Recordset.RecordCount = 0 Then
Formlist.CommandButton2.Enabled = False
Formlist.CommandButton3.Enabled = False
Formlist.CommandButton4.Enabled = False
Formlist.CommandButton5.Enabled = False
Else
Formlist.CommandButton2.Enabled = True
Formlist.CommandButton3.Enabled = True
Formlist.CommandButton4.Enabled = True
Formlist.CommandButton5.Enabled = True
End If
Formlist.DataGrid1.Columns(5).Width = 0
Formlist.Show
Unload Me
Formmain.Hide
End If
e1:
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton3_Click()
Unload Me
Formmain.Hide
Formlist.Show
Formlist.Hide
biaoji = 0
Formsub.Show
Formsub.MaskEdBox1.Enabled = True
Formsub.Label1.Enabled = True ''''''''''建檔時間:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo1.Enabled = True
Formsub.Label12.Enabled = True '''''''''''''''''檔案類型:
'''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo2.Enabled = True
Formsub.Label3.Enabled = True ''''''''''''''''''立卷單位:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo3.Enabled = True
Formsub.Label7.Enabled = True ''''''''保密等級:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo4.Enabled = True
Formsub.Label8.Enabled = True '''''保管期限:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo5.Enabled = True
Formsub.Label9.Enabled = True '存放地點(diǎn):
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox1.Enabled = True
Formsub.Label6.Enabled = True '''''''''''案卷頁數(shù):
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox2.Enabled = True
Formsub.Label11.Enabled = True '案卷內(nèi)容簡介:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox3.Enabled = True
Formsub.Label14.Enabled = True '檔案號:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox4.Enabled = True
Formsub.Label13.Enabled = True '案卷順序號:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox5.Enabled = True
Formsub.Label2.Enabled = True '案卷標(biāo)題:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox6.Enabled = True
Formsub.Label4.Enabled = True '''''''''''''課題負(fù)責(zé)人:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox7.Enabled = True
Formsub.Label5.Enabled = True ''''''''''''案卷標(biāo)題的主題詞:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox8.Enabled = True
Formsub.Label10.Enabled = True '''''''備注:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.MaskEdBox1.Text = Format(Now, "yyyy年mm月dd日")
End Sub
Private Sub Form_Load()
If jibie = False Then
Me.CommandButton3.Visible = False
End If
tiaojian = ""
Me.MaskEdBox1.Text = Format(Now - 30, "yyyy年mm月dd日")
Me.MaskEdBox2.Text = Format(Now, "yyyy年mm月dd日")
DataEnvironment1.Connection1.BeginTrans
If DataEnvironment1.Connection1.Errors.Count = 0 Then
DataEnvironment1.Connection1.CommitTrans
Else
DataEnvironment1.Connection1.RollbackTrans
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Formmain.Show
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -