home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "List Search"
- ClientHeight = 3990
- ClientLeft = 2400
- ClientTop = 1650
- ClientWidth = 6330
- LinkTopic = "Form1"
- ScaleHeight = 3990
- ScaleWidth = 6330
- Begin VB.Frame Frame2
- Height = 3090
- Left = 2910
- TabIndex = 13
- Top = 75
- Width = 3330
- Begin VB.TextBox Text4
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 90
- Locked = -1 'True
- TabIndex = 17
- Top = 2610
- Width = 3135
- End
- Begin VB.TextBox Text3
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 90
- Locked = -1 'True
- TabIndex = 16
- Top = 1800
- Width = 3135
- End
- Begin VB.TextBox Text2
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 90
- Locked = -1 'True
- TabIndex = 15
- Top = 1050
- Width = 2760
- End
- Begin VB.TextBox Text1
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 90
- TabIndex = 14
- Top = 420
- Width = 2295
- End
- Begin VB.Label Label4
- Caption = "Name"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 240
- Left = 90
- TabIndex = 21
- Top = 165
- Width = 1215
- End
- Begin VB.Label Label5
- Caption = "SSN"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 225
- Left = 90
- TabIndex = 20
- Top = 825
- Width = 1125
- End
- Begin VB.Label Label6
- Caption = "American Express"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 225
- Left = 90
- TabIndex = 19
- Top = 1500
- Width = 1665
- End
- Begin VB.Label Label7
- Caption = "VISA"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 225
- Left = 90
- TabIndex = 18
- Top = 2355
- Width = 1890
- End
- End
- Begin VB.ComboBox Combo3
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 150
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 3
- Top = 2610
- Width = 2535
- End
- Begin VB.ComboBox Combo2
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 150
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 1680
- Width = 2535
- End
- Begin VB.ComboBox Combo1
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 150
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 720
- Width = 2535
- End
- Begin VB.CommandButton AddButton
- Caption = "Add New"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 5010
- TabIndex = 0
- Top = 3375
- Width = 1215
- End
- Begin VB.CommandButton CancelButton
- Caption = "Cancel"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 2955
- TabIndex = 2
- Top = 3375
- Visible = 0 'False
- Width = 1215
- End
- Begin VB.CommandButton OKButton
- Caption = "OK"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 5010
- TabIndex = 1
- Top = 3375
- Width = 1215
- End
- Begin VB.Frame Frame1
- Height = 3075
- Left = 0
- TabIndex = 9
- Top = 90
- Width = 2775
- Begin VB.Label Label10
- Caption = "Search by VISA #"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 105
- TabIndex = 12
- Top = 2190
- Width = 2160
- End
- Begin VB.Label Label9
- Caption = "Search by AMEX #"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 105
- TabIndex = 11
- Top = 1260
- Width = 2205
- End
- Begin VB.Label Label8
- Caption = "Search by SSN"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 225
- Left = 105
- TabIndex = 10
- Top = 285
- Width = 1620
- End
- End
- Begin VB.Label Label3
- Caption = "VISA"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 195
- Left = 135
- TabIndex = 8
- Top = 1770
- Width = 1515
- End
- Begin VB.Label Label2
- Caption = "American Express"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 1005
- Width = 1905
- End
- Begin VB.Label Label1
- Caption = "SSN"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 120
- TabIndex = 6
- Top = 285
- Width = 1590
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim DataArray(999, 3) As String
- Dim ArrayIndex As Integer
- Sub ClearFields()
- Text1.Text = ""
- Text2.Text = ""
- Text2.Locked = False
- Text3.Text = ""
- Text3.Locked = False
- Text4.Text = ""
- Text4.Locked = False
- AddButton.Visible = False
- OKButton.Visible = True
- CancelButton.Visible = True
- End Sub
- Sub ShowButtons()
- OKButton.Visible = False
- CancelButton.Visible = False
- AddButton.Visible = True
- Text2.Locked = True
- Text3.Locked = True
- Text4.Locked = True
- End Sub
- Private Sub AddButton_Click()
- ClearFields
- Text1.SetFocus
- End Sub
- Private Sub CancelButton_Click()
- ShowButtons
- Combo1_Click
- End Sub
- Private Sub Combo1_Click()
- If Combo1.ListIndex < 0 Then
- Text1.Text = ""
- Text2.Text = ""
- Text3.Text = ""
- Text4.Text = ""
- Exit Sub
- End If
- ItemIndex = Combo1.ItemData(Combo1.ListIndex)
- Text1.Text = DataArray(ItemIndex, 0)
- Text2.Text = DataArray(ItemIndex, 1)
- Text3.Text = DataArray(ItemIndex, 2)
- Text4.Text = DataArray(ItemIndex, 3)
- End Sub
- Private Sub Combo2_Click()
- If Combo2.ListIndex < 0 Then
- Text1.Text = ""
- Text2.Text = ""
- Text3.Text = ""
- Text4.Text = ""
- Exit Sub
- End If
- ItemIndex = Combo2.ItemData(Combo2.ListIndex)
- Text1.Text = DataArray(ItemIndex, 0)
- Text2.Text = DataArray(ItemIndex, 1)
- Text3.Text = DataArray(ItemIndex, 2)
- Text4.Text = DataArray(ItemIndex, 3)
- End Sub
- Private Sub Combo3_Click()
- If Combo3.ListIndex < 0 Then
- Text1.Text = ""
- Text2.Text = ""
- Text3.Text = ""
- Text4.Text = ""
- Exit Sub
- End If
- ItemIndex = Combo3.ItemData(Combo3.ListIndex)
- Text1.Text = DataArray(ItemIndex, 0)
- Text2.Text = DataArray(ItemIndex, 1)
- Text3.Text = DataArray(ItemIndex, 2)
- Text4.Text = DataArray(ItemIndex, 3)
- End Sub
- Private Sub OKButton_Click()
- Key = Trim(Text1.Text)
- If Key = "" Then
- MsgBox "Key field must be non-mepty"
- Exit Sub
- End If
- ArrayIndex = ArrayIndex + 1
- If Text2.Text <> "" Then
- Combo1.AddItem Text2.Text
- Combo1.ItemData(Combo1.NewIndex) = ArrayIndex
- End If
- If Text3.Text <> "" Then
- Combo2.AddItem Text3.Text
- Combo2.ItemData(Combo2.NewIndex) = ArrayIndex
- End If
- If Text4.Text <> "" Then
- Combo3.AddItem Text4.Text
- Combo3.ItemData(Combo3.NewIndex) = ArrayIndex
- End If
- DataArray(ArrayIndex, 0) = Text1.Text
- DataArray(ArrayIndex, 1) = Text2.Text
- DataArray(ArrayIndex, 2) = Text3.Text
- DataArray(ArrayIndex, 3) = Text4.Text
- Combo1.ListIndex = Combo1.NewIndex
- Combo2.ListIndex = Combo2.NewIndex
- Combo3.ListIndex = Combo3.NewIndex
- ShowButtons
- Text1.SetFocus
- End Sub
-