home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l406 / 4.ddi / FIND.FR_ / FIND.bin (.txt)
Encoding:
Visual Basic Form  |  1992-10-21  |  3.8 KB  |  147 lines

  1. VERSION 2.00
  2. Begin Form fFind 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Find Record"
  5.    ControlBox      =   0   'False
  6.    Height          =   2835
  7.    Left            =   1935
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2412
  10.    ScaleMode       =   0  'User
  11.    ScaleWidth      =   5160
  12.    Top             =   2250
  13.    Width           =   5250
  14.    Begin ListBox cFieldList 
  15.       Height          =   1395
  16.       Left            =   240
  17.       TabIndex        =   2
  18.       Top             =   360
  19.       Width           =   1680
  20.    End
  21.    Begin ListBox cOpsList 
  22.       Height          =   1395
  23.       Left            =   2025
  24.       TabIndex        =   7
  25.       Top             =   360
  26.       Width           =   960
  27.    End
  28.    Begin TextBox cExpr 
  29.       Height          =   290
  30.       Left            =   3102
  31.       TabIndex        =   1
  32.       Top             =   363
  33.       Width           =   1801
  34.    End
  35.    Begin CheckBox cMatchCase 
  36.       Caption         =   "Match Case"
  37.       Height          =   254
  38.       Left            =   3102
  39.       TabIndex        =   8
  40.       Top             =   846
  41.       Width           =   1801
  42.    End
  43.    Begin CommandButton OkayButton 
  44.       Caption         =   "&OK"
  45.       Default         =   -1  'True
  46.       Enabled         =   0   'False
  47.       Height          =   375
  48.       Left            =   597
  49.       TabIndex        =   4
  50.       Top             =   1934
  51.       Width           =   1682
  52.    End
  53.    Begin CommandButton CancelButton 
  54.       Cancel          =   -1  'True
  55.       Caption         =   "&Cancel"
  56.       Height          =   375
  57.       Left            =   2863
  58.       TabIndex        =   5
  59.       Top             =   1934
  60.       Width           =   1682
  61.    End
  62.    Begin Label OpsLabel 
  63.       Caption         =   "Operators:"
  64.       Height          =   254
  65.       Left            =   2028
  66.       TabIndex        =   6
  67.       Top             =   121
  68.       Width           =   966
  69.    End
  70.    Begin Label FieldListLabel 
  71.       Caption         =   "Fields:"
  72.       Height          =   254
  73.       Left            =   239
  74.       TabIndex        =   3
  75.       Top             =   121
  76.       Width           =   1086
  77.    End
  78.    Begin Label ExprLabel 
  79.       Caption         =   "Value or Expression:"
  80.       Height          =   254
  81.       Left            =   3102
  82.       TabIndex        =   0
  83.       Top             =   121
  84.       Width           =   1801
  85.    End
  86. Option Explicit
  87. Dim FNotFound As Integer
  88. Sub CancelButton_Click ()
  89.   Hide
  90.   'set the flag for the dynaset/dynagrid form
  91.   gfFindFailed = True
  92. End Sub
  93. Sub cExpr_Change ()
  94.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  95.     OkayButton.Enabled = True
  96.   Else
  97.     OkayButton.Enabled = False
  98.   End If
  99. End Sub
  100. Sub cFieldList_Click ()
  101.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  102.     OkayButton.Enabled = True
  103.   Else
  104.     OkayButton.Enabled = False
  105.   End If
  106. End Sub
  107. Sub cOpsList_Click ()
  108.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  109.     OkayButton.Enabled = True
  110.   Else
  111.     OkayButton.Enabled = False
  112.   End If
  113. End Sub
  114. Sub Form_Load ()
  115.   FNotFound = False
  116.   cOpsList.AddItem "="
  117.   cOpsList.AddItem "<>"
  118.   cOpsList.AddItem ">="
  119.   cOpsList.AddItem "<="
  120.   cOpsList.AddItem ">"
  121.   cOpsList.AddItem "<"
  122.   cOpsList.AddItem "Like"
  123. End Sub
  124. Sub OkayButton_Click ()
  125.    Dim i As Integer
  126.    On Error GoTo FindErr
  127.    i = cFieldList.ListIndex
  128.    FNotFound = False
  129.    SetHourGlass Me
  130.    gstFindField = cFieldList
  131.    gstFindExpr = cExpr
  132.    gstFindOp = cOpsList
  133.    gfFindMatch = cMatchCase
  134.    Hide
  135.    GoTo FindEnd
  136. FindErr:
  137.    If Err <> EOF_ERR Then
  138.      ShowError
  139.      Resume FindEnd
  140.    Else
  141.      FNotFound = True
  142.      Resume Next
  143.    End If
  144. FindEnd:
  145.    ResetMouse Me
  146. End Sub
  147.