home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l405 / 4.ddi / FIND.FR_ / FIND.bin (.txt)
Encoding:
Visual Basic Form  |  1993-04-28  |  4.3 KB  |  163 lines

  1. VERSION 2.00
  2. Begin Form fFind 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Find Record"
  6.    ControlBox      =   0   'False
  7.    Height          =   2832
  8.    Left            =   1932
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   2412
  13.    ScaleMode       =   0  'User
  14.    ScaleWidth      =   5160
  15.    Top             =   2256
  16.    Width           =   5256
  17.    Begin ListBox cFieldList 
  18.       BackColor       =   &H00FFFFFF&
  19.       Height          =   1368
  20.       Left            =   240
  21.       TabIndex        =   2
  22.       Tag             =   " OL"
  23.       Top             =   360
  24.       Width           =   1692
  25.    End
  26.    Begin ListBox cOpsList 
  27.       BackColor       =   &H00FFFFFF&
  28.       Height          =   1368
  29.       Left            =   2040
  30.       TabIndex        =   7
  31.       Tag             =   " OL"
  32.       Top             =   360
  33.       Width           =   960
  34.    End
  35.    Begin TextBox cExpr 
  36.       BackColor       =   &H00FFFFFF&
  37.       Height          =   287
  38.       Left            =   3120
  39.       TabIndex        =   1
  40.       Tag             =   " OL"
  41.       Top             =   360
  42.       Width           =   1811
  43.    End
  44.    Begin CheckBox cMatchCase 
  45.       BackColor       =   &H00C0C0C0&
  46.       Caption         =   "Match Case"
  47.       Height          =   252
  48.       Left            =   3120
  49.       TabIndex        =   8
  50.       Top             =   839
  51.       Width           =   1811
  52.    End
  53.    Begin CommandButton OkayButton 
  54.       Caption         =   "&OK"
  55.       Default         =   -1  'True
  56.       Enabled         =   0   'False
  57.       Height          =   372
  58.       Left            =   600
  59.       TabIndex        =   4
  60.       Top             =   1919
  61.       Width           =   1691
  62.    End
  63.    Begin CommandButton CancelButton 
  64.       Cancel          =   -1  'True
  65.       Caption         =   "&Cancel"
  66.       Height          =   372
  67.       Left            =   2879
  68.       TabIndex        =   5
  69.       Top             =   1919
  70.       Width           =   1691
  71.    End
  72.    Begin Label OpsLabel 
  73.       BackColor       =   &H00C0C0C0&
  74.       Caption         =   "Operators:"
  75.       Height          =   192
  76.       Left            =   2039
  77.       TabIndex        =   6
  78.       Top             =   120
  79.       Width           =   971
  80.    End
  81.    Begin Label FieldListLabel 
  82.       BackColor       =   &H00C0C0C0&
  83.       Caption         =   "Fields:"
  84.       Height          =   192
  85.       Left            =   240
  86.       TabIndex        =   3
  87.       Top             =   120
  88.       Width           =   1092
  89.    End
  90.    Begin Label ExprLabel 
  91.       BackColor       =   &H00C0C0C0&
  92.       Caption         =   "Value or Expression:"
  93.       Height          =   192
  94.       Left            =   3120
  95.       TabIndex        =   0
  96.       Top             =   120
  97.       Width           =   1811
  98.    End
  99. Option Explicit
  100. Dim FNotFound As Integer
  101. Sub CancelButton_Click ()
  102.   Hide
  103.   'set the flag for the dynaset/dynagrid form
  104.   gfFindFailed = True
  105. End Sub
  106. Sub cExpr_Change ()
  107.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  108.     OkayButton.Enabled = True
  109.   Else
  110.     OkayButton.Enabled = False
  111.   End If
  112. End Sub
  113. Sub cFieldList_Click ()
  114.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  115.     OkayButton.Enabled = True
  116.   Else
  117.     OkayButton.Enabled = False
  118.   End If
  119. End Sub
  120. Sub cOpsList_Click ()
  121.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  122.     OkayButton.Enabled = True
  123.   Else
  124.     OkayButton.Enabled = False
  125.   End If
  126. End Sub
  127. Sub Form_Load ()
  128.   FNotFound = False
  129.   cOpsList.AddItem "="
  130.   cOpsList.AddItem "<>"
  131.   cOpsList.AddItem ">="
  132.   cOpsList.AddItem "<="
  133.   cOpsList.AddItem ">"
  134.   cOpsList.AddItem "<"
  135.   cOpsList.AddItem "Like"
  136. End Sub
  137. Sub Form_Paint ()
  138.   Outlines Me
  139. End Sub
  140. Sub OkayButton_Click ()
  141.    Dim i As Integer
  142.    On Error GoTo FindErr
  143.    i = cFieldList.ListIndex
  144.    FNotFound = False
  145.    SetHourGlass Me
  146.    gstFindField = cFieldList
  147.    gstFindExpr = cExpr
  148.    gstFindOp = cOpsList
  149.    gfFindMatch = cMatchCase
  150.    Hide
  151.    GoTo FindEnd
  152. FindErr:
  153.    If Err <> EOF_ERR Then
  154.      ShowError
  155.      Resume FindEnd
  156.    Else
  157.      FNotFound = True
  158.      Resume Next
  159.    End If
  160. FindEnd:
  161.    ResetMouse Me
  162. End Sub
  163.