home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "List Search"
- ClientHeight = 3525
- ClientLeft = 2400
- ClientTop = 1650
- ClientWidth = 6330
- LinkTopic = "Form1"
- ScaleHeight = 3525
- ScaleWidth = 6330
- 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 = 2235
- 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 = 105
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 1440
- 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 = 105
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 9
- Top = 660
- 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 = 4890
- TabIndex = 0
- Top = 2835
- 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 = 2970
- TabIndex = 2
- Top = 2835
- 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 = 4890
- TabIndex = 1
- Top = 2835
- Width = 1215
- 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 = 330
- Left = 2985
- TabIndex = 7
- Top = 555
- Width = 1455
- 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 = 315
- Left = 4665
- Locked = -1 'True
- TabIndex = 6
- Top = 555
- Width = 1455
- 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 = 315
- Left = 2985
- Locked = -1 'True
- TabIndex = 5
- Top = 1320
- Width = 3135
- End
- 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 = 315
- Left = 2985
- Locked = -1 'True
- TabIndex = 4
- Top = 1995
- Width = 3135
- End
- Begin VB.Frame Frame1
- Height = 2700
- Left = 0
- TabIndex = 17
- Top = 225
- Width = 2775
- Begin VB.Label Label10
- Caption = "Search by VISA #"
- Height = 225
- Left = 180
- TabIndex = 20
- Top = 1770
- Width = 1395
- End
- Begin VB.Label Label9
- Caption = "Search by AMEX #"
- Height = 255
- Left = 180
- TabIndex = 19
- Top = 945
- Width = 1545
- End
- Begin VB.Label Label8
- Caption = "Search By SSN"
- Height = 225
- Left = 180
- TabIndex = 18
- Top = 165
- Width = 1620
- End
- 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 = 3015
- TabIndex = 16
- Top = 1740
- Width = 1890
- 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 = 3015
- TabIndex = 15
- Top = 1020
- Width = 1665
- 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 = 4665
- TabIndex = 14
- Top = 330
- Width = 1125
- 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 = 2970
- TabIndex = 13
- Top = 300
- Width = 1215
- 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 = 12
- 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 = 11
- Top = 1035
- 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 = 10
- 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
- Combo1.AddItem Text2.Text
- Combo1.ItemData(Combo1.NewIndex) = ArrayIndex
- 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
-