home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form fFind
- BorderStyle = 3 'Fixed Double
- Caption = "Find Record"
- ControlBox = 0 'False
- Height = 2835
- Left = 1935
- LinkTopic = "Form1"
- ScaleHeight = 2412
- ScaleMode = 0 'User
- ScaleWidth = 5160
- Top = 2250
- Width = 5250
- Begin ListBox cFieldList
- Height = 1395
- Left = 240
- TabIndex = 2
- Top = 360
- Width = 1680
- End
- Begin ListBox cOpsList
- Height = 1395
- Left = 2025
- TabIndex = 7
- Top = 360
- Width = 960
- End
- Begin TextBox cExpr
- Height = 290
- Left = 3102
- TabIndex = 1
- Top = 363
- Width = 1801
- End
- Begin CheckBox cMatchCase
- Caption = "Match Case"
- Height = 254
- Left = 3102
- TabIndex = 8
- Top = 846
- Width = 1801
- End
- Begin CommandButton OkayButton
- Caption = "&OK"
- Default = -1 'True
- Enabled = 0 'False
- Height = 375
- Left = 597
- TabIndex = 4
- Top = 1934
- Width = 1682
- End
- Begin CommandButton CancelButton
- Cancel = -1 'True
- Caption = "&Cancel"
- Height = 375
- Left = 2863
- TabIndex = 5
- Top = 1934
- Width = 1682
- End
- Begin Label OpsLabel
- Caption = "Operators:"
- Height = 254
- Left = 2028
- TabIndex = 6
- Top = 121
- Width = 966
- End
- Begin Label FieldListLabel
- Caption = "Fields:"
- Height = 254
- Left = 239
- TabIndex = 3
- Top = 121
- Width = 1086
- End
- Begin Label ExprLabel
- Caption = "Value or Expression:"
- Height = 254
- Left = 3102
- TabIndex = 0
- Top = 121
- Width = 1801
- End
- Option Explicit
- Dim FNotFound As Integer
- Sub CancelButton_Click ()
- Hide
- 'set the flag for the dynaset/dynagrid form
- gfFindFailed = True
- End Sub
- Sub cExpr_Change ()
- If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
- OkayButton.Enabled = True
- Else
- OkayButton.Enabled = False
- End If
- End Sub
- Sub cFieldList_Click ()
- If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
- OkayButton.Enabled = True
- Else
- OkayButton.Enabled = False
- End If
- End Sub
- Sub cOpsList_Click ()
- If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
- OkayButton.Enabled = True
- Else
- OkayButton.Enabled = False
- End If
- End Sub
- Sub Form_Load ()
- FNotFound = False
- cOpsList.AddItem "="
- cOpsList.AddItem "<>"
- cOpsList.AddItem ">="
- cOpsList.AddItem "<="
- cOpsList.AddItem ">"
- cOpsList.AddItem "<"
- cOpsList.AddItem "Like"
- End Sub
- Sub OkayButton_Click ()
- Dim i As Integer
- On Error GoTo FindErr
- i = cFieldList.ListIndex
- FNotFound = False
- SetHourGlass Me
- gstFindField = cFieldList
- gstFindExpr = cExpr
- gstFindOp = cOpsList
- gfFindMatch = cMatchCase
- Hide
- GoTo FindEnd
- FindErr:
- If Err <> EOF_ERR Then
- ShowError
- Resume FindEnd
- Else
- FNotFound = True
- Resume Next
- End If
- FindEnd:
- ResetMouse Me
- End Sub
-