home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmFindForm
- BorderStyle = 3 'Fixed Double
- Caption = "Find Record"
- ClientHeight = 2430
- ClientLeft = 1995
- ClientTop = 2595
- ClientWidth = 5445
- Height = 2835
- HelpContextID = 2016128
- Icon = "FIND.frx":0000
- Left = 1935
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2411.999
- ScaleMode = 0 'User
- ScaleWidth = 5476.842
- Top = 2250
- Width = 5565
- Begin VB.OptionButton optFindType
- Caption = "FindLast"
- Height = 255
- Index = 3
- Left = 3120
- TabIndex = 11
- Top = 1440
- Width = 2055
- End
- Begin VB.OptionButton optFindType
- Caption = "FindPrevious"
- Height = 255
- Index = 2
- Left = 3120
- TabIndex = 10
- Top = 1200
- Width = 2055
- End
- Begin VB.OptionButton optFindType
- Caption = "FindNext"
- Height = 255
- Index = 1
- Left = 3120
- TabIndex = 9
- Top = 960
- Width = 2055
- End
- Begin VB.OptionButton optFindType
- Caption = "FindFirst"
- Height = 255
- Index = 0
- Left = 3120
- TabIndex = 8
- Top = 720
- Value = -1 'True
- Width = 2055
- End
- Begin VB.ListBox lstFields
- BackColor = &H00FFFFFF&
- Height = 1395
- Left = 240
- TabIndex = 2
- Top = 360
- Width = 1695
- End
- Begin VB.ListBox lstOperators
- BackColor = &H00FFFFFF&
- Height = 1395
- ItemData = "FIND.frx":030A
- Left = 2040
- List = "FIND.frx":0323
- TabIndex = 7
- Top = 360
- Width = 960
- End
- Begin VB.TextBox txtExpression
- BackColor = &H00FFFFFF&
- Height = 285
- Left = 3120
- TabIndex = 1
- Top = 360
- Width = 2055
- End
- Begin VB.CommandButton cmdOK
- Caption = "&OK"
- Default = -1 'True
- Enabled = 0 'False
- Height = 372
- Left = 600
- TabIndex = 4
- Top = 1919
- Width = 1691
- End
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "&Cancel"
- Height = 372
- Left = 2879
- TabIndex = 5
- Top = 1919
- Width = 1691
- End
- Begin VB.Label lblLabels
- AutoSize = -1 'True
- Caption = "Operators: "
- Height = 195
- Index = 0
- Left = 2040
- TabIndex = 6
- Top = 120
- Width = 780
- End
- Begin VB.Label lblLabels
- AutoSize = -1 'True
- Caption = "Fields: "
- Height = 195
- Index = 1
- Left = 240
- TabIndex = 3
- Top = 120
- Width = 495
- End
- Begin VB.Label lblLabels
- AutoSize = -1 'True
- Caption = "Value or Expression: "
- Height = 195
- Index = 2
- Left = 3120
- TabIndex = 0
- Top = 120
- Width = 1485
- End
- Attribute VB_Name = "frmFindForm"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim mbNotFound As Integer
- Private Sub cmdCancel_Click()
- Hide
- 'set the flag for the recordset/recagrid form
- gbFindFailed = True
- End Sub
- Private Sub optFindType_Click(Index As Integer)
- gnFindType = Index
- End Sub
- Private Sub txtExpression_Change()
- If Len(lstFields.Text) > 0 And Len(lstOperators.Text) > 0 And Len(txtExpression.Text) > 0 Then
- cmdOK.Enabled = True
- Else
- cmdOK.Enabled = False
- End If
- End Sub
- Private Sub lstFields_Click()
- If Len(lstFields.Text) > 0 And Len(lstOperators.Text) > 0 And Len(txtExpression.Text) > 0 Then
- cmdOK.Enabled = True
- Else
- cmdOK.Enabled = False
- End If
- End Sub
- Private Sub lstOperators_Click()
- If Len(lstFields.Text) > 0 And Len(lstOperators.Text) > 0 And Len(txtExpression.Text) > 0 Then
- cmdOK.Enabled = True
- Else
- cmdOK.Enabled = False
- End If
- End Sub
- Private Sub Form_Load()
- CenterMe Me, gnMDIFORM
- mbNotFound = False
- End Sub
- Private Sub cmdOK_Click()
- On Error GoTo FindErr
- Dim i As Integer
- i = lstFields.ListIndex
- mbNotFound = False
- SetHourglass
- gsFindField = lstFields.Text
- gsFindExpr = txtExpression.Text
- gsFindOp = lstOperators.Text
- Hide
- Screen.MousePointer = vbDefault
- Exit Sub
- FindErr:
- If Err <> gnEOF_ERR Then
- ShowError
- Exit Sub
- Else
- mbNotFound = True
- Resume Next
- End If
- End Sub
-