VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form frmContractChild 
   Caption         =   "Обязательства/список"
   ClientHeight    =   6000
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7890
   Icon            =   "frmContractChild.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6000
   ScaleWidth      =   7890
   StartUpPosition =   2  'CenterScreen
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "frmContractChild.frx":08CA
      Height          =   4935
      Left            =   240
      OleObjectBlob   =   "frmContractChild.frx":08E1
      TabIndex        =   1
      Top             =   240
      Width           =   7455
   End
   Begin VB.Data DataContract 
      Connect         =   "Access"
      DatabaseName    =   "Localisation.mdb"
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   240
      Options         =   0
      ReadOnly        =   -1  'True
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "SELECT fldDate, fldFact, fldDescription FROM tblContract"
      Top             =   5400
      Width           =   5535
   End
   Begin VB.CommandButton btnOK 
      Caption         =   "Закрыть"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6360
      TabIndex        =   0
      Top             =   5400
      Width           =   1335
   End
End
Attribute VB_Name = "frmContractChild"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub btnAdd_Click()
FormStatus = FSAdd
ContractChild.Show 1
End Sub

Private Sub btnChange_Click()
FormStatus = FSChange
ContractChild.Show 1
End Sub

Private Sub btnOK_Click()
Unload Me
End Sub

Private Sub Combo1_Click()
Select Case Combo1.ListIndex
    Case 1
        SQLContract = " AND fldFact = '-'"
        DataContract.RecordSource = "SELECT fldDescription, fldDate, fldFact, fldResponsible FROM tblContract WHERE " & "fldFact = '-'"
        DataContract.UpdateRecord
        DBGrid1.Refresh
    Case 2
        SQLContract = " AND fldFact <> '-'"
        DataContract.RecordSource = "SELECT fldIDFirm, fldDescription, fldRemark, fldDate, fldFact, fldResponsible FROM tblContract WHERE " & "fldFact <> '-'"
        DataContract.UpdateRecord
        DBGrid1.Refresh
    Case Else
        SQLContract = ""
        DataContract.RecordSource = "SELECT fldDate, fldDescription FROM tblContract"
'        DataContract.UpdateRecord
        DBGrid1.Refresh
End Select
End Sub

Private Sub Form_Load()
DataContract.RecordSource = SQLMainContract
End Sub
