home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk4 / find.fr_ / find.bin
Text File  |  1993-04-28  |  4KB  |  179 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. End
  100. Option Explicit
  101. Dim FNotFound As Integer
  102.  
  103. Sub CancelButton_Click ()
  104.   Hide
  105.   'set the flag for the dynaset/dynagrid form
  106.   gfFindFailed = True
  107. End Sub
  108.  
  109. Sub cExpr_Change ()
  110.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  111.     OkayButton.Enabled = True
  112.   Else
  113.     OkayButton.Enabled = False
  114.   End If
  115. End Sub
  116.  
  117. Sub cFieldList_Click ()
  118.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  119.     OkayButton.Enabled = True
  120.   Else
  121.     OkayButton.Enabled = False
  122.   End If
  123. End Sub
  124.  
  125. Sub cOpsList_Click ()
  126.   If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
  127.     OkayButton.Enabled = True
  128.   Else
  129.     OkayButton.Enabled = False
  130.   End If
  131. End Sub
  132.  
  133. Sub Form_Load ()
  134.   FNotFound = False
  135.   cOpsList.AddItem "="
  136.   cOpsList.AddItem "<>"
  137.   cOpsList.AddItem ">="
  138.   cOpsList.AddItem "<="
  139.   cOpsList.AddItem ">"
  140.   cOpsList.AddItem "<"
  141.   cOpsList.AddItem "Like"
  142. End Sub
  143.  
  144. Sub Form_Paint ()
  145.   Outlines Me
  146. End Sub
  147.  
  148. Sub OkayButton_Click ()
  149.    Dim i As Integer
  150.  
  151.    On Error GoTo FindErr
  152.  
  153.    i = cFieldList.ListIndex
  154.    FNotFound = False
  155.    SetHourGlass Me
  156.  
  157.    gstFindField = cFieldList
  158.    gstFindExpr = cExpr
  159.    gstFindOp = cOpsList
  160.    gfFindMatch = cMatchCase
  161.  
  162.    Hide
  163.    GoTo FindEnd
  164.  
  165. FindErr:
  166.    If Err <> EOF_ERR Then
  167.      ShowError
  168.      Resume FindEnd
  169.    Else
  170.      FNotFound = True
  171.      Resume Next
  172.    End If
  173.  
  174. FindEnd:
  175.    ResetMouse Me
  176.  
  177. End Sub
  178.  
  179.