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

📄 合同信息查询.frm

📁 本软件为咨询公司开发的合同管理软件,运用MDB数据库.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Enabled         =   0   'False
      Height          =   375
      Left            =   2400
      TabIndex        =   13
      Top             =   720
      Width           =   2895
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   2400
      TabIndex        =   12
      Top             =   240
      Width           =   2895
   End
   Begin VB.Label Label13 
      Caption         =   "备    注:"
      Height          =   375
      Left            =   720
      TabIndex        =   38
      Top             =   7080
      Width           =   1335
   End
   Begin VB.Label Label17 
      Caption         =   "认 证 费:"
      Height          =   375
      Left            =   720
      TabIndex        =   37
      Top             =   6120
      Width           =   1215
   End
   Begin VB.Label Label18 
      Caption         =   "咨 询 费:"
      Height          =   495
      Left            =   720
      TabIndex        =   36
      Top             =   6600
      Width           =   1215
   End
   Begin VB.Line Line1 
      BorderWidth     =   2
      X1              =   5640
      X2              =   5640
      Y1              =   0
      Y2              =   7680
   End
   Begin VB.Label Label12 
      Caption         =   "合同金额:"
      Height          =   375
      Left            =   720
      TabIndex        =   11
      Top             =   5640
      Width           =   1335
   End
   Begin VB.Label Label11 
      Caption         =   "企业类别:"
      Height          =   375
      Left            =   720
      TabIndex        =   10
      Top             =   5160
      Width           =   1335
   End
   Begin VB.Label Label10 
      Caption         =   "认证机构:"
      Height          =   375
      Left            =   720
      TabIndex        =   9
      Top             =   4665
      Width           =   1335
   End
   Begin VB.Label Label9 
      Caption         =   "发证日期:"
      Height          =   375
      Left            =   720
      TabIndex        =   8
      Top             =   4170
      Width           =   1335
   End
   Begin VB.Label Label8 
      Caption         =   "启动日期:"
      Height          =   375
      Left            =   720
      TabIndex        =   7
      Top             =   3690
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "合同编号:"
      Height          =   375
      Left            =   720
      TabIndex        =   6
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "单位名称:"
      Height          =   375
      Left            =   720
      TabIndex        =   5
      Top             =   735
      Width           =   1335
   End
   Begin VB.Label Label3 
      Caption         =   "体    系:"
      Height          =   375
      Left            =   720
      TabIndex        =   4
      Top             =   1230
      Width           =   1335
   End
   Begin VB.Label Label4 
      Caption         =   "部门责任人:"
      Height          =   375
      Left            =   720
      TabIndex        =   3
      Top             =   1710
      Width           =   1455
   End
   Begin VB.Label Label5 
      Caption         =   "签 约 人:"
      Height          =   375
      Left            =   720
      TabIndex        =   2
      Top             =   2205
      Width           =   1335
   End
   Begin VB.Label Label6 
      Caption         =   "咨 询 师:"
      Height          =   375
      Left            =   720
      TabIndex        =   1
      Top             =   2700
      Width           =   1335
   End
   Begin VB.Label Label7 
      Caption         =   "签订日期:"
      Height          =   375
      Left            =   720
      TabIndex        =   0
      Top             =   3195
      Width           =   1335
   End
End
Attribute VB_Name = "合同信息查询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim xxdb As ADODB.Connection
Dim xxrs As ADODB.Recordset
Dim strsql As String

Private Sub DBCombo1_Change()
 
 Data3.RecordSource = "select * from 合同信息表 where 单位名称 like '*" & Trim(DBCombo1.Text) & "*'"
 Data3.Refresh
 


End Sub

Private Sub DBCombo1_Click(Area As Integer)
DBCombo1.Refresh
DBCombo1.ListField = "单位名称"
DBCombo1.ReFill

End Sub

Private Sub Command1_Click()
Dim sqltr As String
sqltr = ""
If Trim(Text12.Text) <> "" Then
    If sqltr = "" Then
    sqltr = " 编号 = '" & Trim(Text12.Text) & "'"
    Else
    sqltr = sqltr + " AND 编号 = '" & Trim(Text12.Text) & "'"
    End If
End If
If Trim(DBCombo1.Text) <> "" Then
    If sqltr = "" Then
    sqltr = " 单位名称 = '" & Trim(DBCombo1.Text) & "'"
    Else
    sqltr = sqltr + " AND 单位名称 = '" & Trim(DBCombo1.Text) & "'"
    End If
End If
     
If Trim(Text12.Text) = "" And Trim(DBCombo1.Text = "") Then
    MsgBox "你没有输入需要查询的条件", vbOKOnly, "提示信息!"
    GoTo bb
End If

    Set xxdb = New ADODB.Connection
    xxdb.CursorLocation = adUseClient
    xxdb.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & dblj & ";Persist Security Info=False"
    Set xxrs = New ADODB.Recordset
    sqltr = "select * from 合同信息表  where " & sqltr
    xxrs.Open sqltr, xxdb, adOpenKeyset, adLockOptimistic
    res = xxrs.RecordCount
    If res = 0 Then
    MsgBox "没有查询到你需要的数据", vbOKOnly, "信息提示!!"
    GoTo bb
    Else
htbh = Trim(xxrs!编号)
Text1.Text = xxrs!编号
Text2.Text = xxrs!单位名称
Text3.Text = xxrs!体系
Text4.Text = xxrs!部门责任人
Text5.Text = xxrs!签约人
Text6.Text = xxrs!咨询师
Text7.Text = xxrs!签订日期
Text8.Text = xxrs!启动日期
Text9.Text = xxrs!发证日期
Text10.Text = xxrs!认证机构
Text11.Text = xxrs!认证性质
Text14.Text = xxrs!合同金额
Text17.Text = xxrs!认证费
Text16.Text = xxrs!咨询费
Text15.Text = xxrs!备注
End If
bb:
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text14.Text = ""
Text17.Text = ""
Text16.Text = ""
Text15.Text = ""

Text12.Text = ""
DBCombo1.Text = ""
Text12.SetFocus
End Sub

Private Sub Command3_Click()
If Text1.Text = "" Then
    MsgBox "没有需要打印的数据", vbOKOnly, "信息提示!!"
Else
打印合同信息.Show
End If
End Sub

Private Sub Command4_Click()
On Error GoTo bb
xxrs.ActiveConnection = Nothing
xxdb.Close

bb:
Data1.Database.Close
Data2.Database.Close
Unload Me
End Sub

Private Sub Form_Activate()
Text12.SetFocus
End Sub

Private Sub Form_Load()
'dblj = App.Path + "\data\htxxk.mdb"
Data1.DatabaseName = dblj
Data1.RecordSource = "体系"
Data2.DatabaseName = dblj
Data2.RecordSource = "认证机构"
Data3.DatabaseName = dblj
Data3.RecordSource = "合同信息表"


End Sub

⌨️ 快捷键说明

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