⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formview.frm

📁 给人写的毕设
💻 FRM
📖 第 1 页 / 共 3 页
字号:
Formsub.DataCombo4.Enabled = True
 Formsub.Label8.Enabled = True               '''''保管期限:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.DataCombo5.Enabled = True
Formsub.Label9.Enabled = True           '存放地点:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox1.Enabled = True
 Formsub.Label6.Enabled = True              '''''''''''案卷页数:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox2.Enabled = True
 Formsub.Label11.Enabled = True             '案卷内容简介:
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox3.Enabled = True
 Formsub.Label14.Enabled = True            '档案号:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox4.Enabled = True
 Formsub.Label13.Enabled = True                 '案卷顺序号:
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox5.Enabled = True
 Formsub.Label2.Enabled = True             '案卷标题:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox6.Enabled = True
 Formsub.Label4.Enabled = True          '''''''''''''课题负责人:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox7.Enabled = True
 Formsub.Label5.Enabled = True       ''''''''''''案卷标题的主题词:
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
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 "请准确输入时间段!", , "注意:"
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 "您已选择了“档案号”,但没输入内容", , "注意:"
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 "您已选择了“案卷顺序号”,但没输入内容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''
If Me.Check5.Value = 1 Then
Formsub.TextBox5.Enabled = False
 Formsub.Label2.Enabled = False             '案卷标题:
If Trim(TextBox5.Text) <> "" Then
tiao5 = " [案卷标题] " + " 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             '案卷标题:
MsgBox "您已选择了“案卷标题”,但没输入内容", , "注意:"
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 "您已选择了“档案类型”,但没选择内容", , "注意:"
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 "您已选择了“立卷单位”,但没选择内容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''
If Me.Check8.Value = 1 Then
Formsub.TextBox6.Enabled = False
 Formsub.Label4.Enabled = False         '''''''''''''课题负责人:
If Trim(TextBox6.Text) <> "" Then
tiao8 = " [课题负责人] " + " 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          '''''''''''''课题负责人:
MsgBox "您已选择了“课题负责人”,但没输入内容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''
If Me.Check9.Value = 1 Then
Formsub.TextBox7.Enabled = False
 Formsub.Label5.Enabled = False     ''''''''''''案卷标题的主题词:
If Trim(TextBox7.Text) <> "" Then
tiao9 = " [案卷标题的主题词] " + " 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       ''''''''''''案卷标题的主题词:
MsgBox "您已选择了“案卷标题的主题词”,但没输入内容", , "注意:"
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 "您已选择了“保密等级”,但没选择内容", , "注意:"
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 "您已选择了“保管期限”,但没选择内容", , "注意:"
GoTo e1:
End If
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''
If Me.Check12.Value = 1 Then
Formsub.DataCombo5.Enabled = False
Formsub.Label9.Enabled = False           '存放地点:
If Trim(Me.DataCombo5.Text) <> "" Then
tiao12 = " [存放地点] " + " = " + "'" & 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           '存放地点:
MsgBox "您已选择了“存放地点”,但没选择内容", , "注意:"
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           '存放地点:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox1.Enabled = True
 Formsub.Label6.Enabled = True              '''''''''''案卷页数:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox2.Enabled = True
 Formsub.Label11.Enabled = True             '案卷内容简介:
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox3.Enabled = True
 Formsub.Label14.Enabled = True            '档案号:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox4.Enabled = True
 Formsub.Label13.Enabled = True                 '案卷顺序号:
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox5.Enabled = True
 Formsub.Label2.Enabled = True             '案卷标题:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox6.Enabled = True
 Formsub.Label4.Enabled = True          '''''''''''''课题负责人:
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Formsub.TextBox7.Enabled = True
 Formsub.Label5.Enabled = True       ''''''''''''案卷标题的主题词:
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -