home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / fieldpak / fpdemo2s.frm < prev    next >
Text File  |  1993-11-09  |  3KB  |  134 lines

  1. VERSION 2.00
  2. Begin Form SortFrm 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Select Sort Field"
  5.    ClientHeight    =   2745
  6.    ClientLeft      =   3390
  7.    ClientTop       =   3825
  8.    ClientWidth     =   2940
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    Height          =   3150
  12.    Left            =   3330
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   2745
  17.    ScaleWidth      =   2940
  18.    Top             =   3480
  19.    Width           =   3060
  20.    Begin CommandButton cmdCancel 
  21.       Caption         =   "Cancel"
  22.       Height          =   315
  23.       Left            =   1560
  24.       TabIndex        =   8
  25.       Top             =   1800
  26.       Width           =   1155
  27.    End
  28.    Begin CommandButton cmdOK 
  29.       Caption         =   "OK"
  30.       Height          =   315
  31.       Left            =   1560
  32.       TabIndex        =   7
  33.       Top             =   720
  34.       Width           =   1155
  35.    End
  36.    Begin OptionButton optRadioButton 
  37.       Caption         =   "Phone"
  38.       Height          =   255
  39.       Index           =   6
  40.       Left            =   180
  41.       TabIndex        =   6
  42.       Top             =   2340
  43.       Width           =   1215
  44.    End
  45.    Begin OptionButton optRadioButton 
  46.       Caption         =   "Area Code"
  47.       Height          =   255
  48.       Index           =   5
  49.       Left            =   180
  50.       TabIndex        =   5
  51.       Top             =   1980
  52.       Width           =   1215
  53.    End
  54.    Begin OptionButton optRadioButton 
  55.       Caption         =   "Zip"
  56.       Height          =   255
  57.       Index           =   4
  58.       Left            =   180
  59.       TabIndex        =   4
  60.       Top             =   1620
  61.       Width           =   1215
  62.    End
  63.    Begin OptionButton optRadioButton 
  64.       Caption         =   "State"
  65.       Height          =   255
  66.       Index           =   3
  67.       Left            =   180
  68.       TabIndex        =   3
  69.       Top             =   1260
  70.       Width           =   1215
  71.    End
  72.    Begin OptionButton optRadioButton 
  73.       Caption         =   "City"
  74.       Height          =   255
  75.       Index           =   2
  76.       Left            =   180
  77.       TabIndex        =   2
  78.       Top             =   900
  79.       Width           =   1215
  80.    End
  81.    Begin OptionButton optRadioButton 
  82.       Caption         =   "Address"
  83.       Height          =   255
  84.       Index           =   1
  85.       Left            =   180
  86.       TabIndex        =   1
  87.       Top             =   540
  88.       Width           =   1215
  89.    End
  90.    Begin OptionButton optRadioButton 
  91.       Caption         =   "Name"
  92.       Height          =   255
  93.       Index           =   0
  94.       Left            =   180
  95.       TabIndex        =   0
  96.       Top             =   180
  97.       Width           =   1215
  98.    End
  99. End
  100.  
  101. Option Explicit
  102.  
  103. Dim selected_field As Integer
  104.  
  105. Sub cmdCancel_Click ()
  106.  
  107.     SortForm_OK_or_Cancel = 1
  108.     Unload SortFrm
  109.  
  110. End Sub
  111.  
  112. Sub cmdOK_Click ()
  113.  
  114.     SortField = selected_field
  115.     EditFrm.lblCurrentSortField.Caption = optRadioButton(selected_field - 1).Caption
  116.     SortForm_OK_or_Cancel = 0
  117.     Unload SortFrm
  118.  
  119. End Sub
  120.  
  121. Sub Form_Load ()
  122.  
  123.     selected_field = SortField
  124.     optRadioButton(selected_field - 1).Value = True
  125.  
  126. End Sub
  127.  
  128. Sub optRadioButton_Click (Index As Integer)
  129.  
  130.     selected_field = Index + 1
  131.  
  132. End Sub
  133.  
  134.