home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH12 / 12-3-2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-10-05  |  2.7 KB  |  85 lines

  1. VERSION 5.00
  2. Object = "{FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0"; "DBLIST32.OCX"
  3. Begin VB.Form frmCountries 
  4.    Caption         =   "Large Countries"
  5.    ClientHeight    =   2070
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   3975
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2070
  11.    ScaleWidth      =   3975
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton cmdSort 
  14.       Caption         =   "Sort by 1995 Population"
  15.       Height          =   615
  16.       Left            =   1800
  17.       TabIndex        =   1
  18.       Top             =   120
  19.       Width           =   2055
  20.    End
  21.    Begin MSDBCtls.DBList dblCountries 
  22.       Bindings        =   "12-3-2.frx":0000
  23.       Height          =   1815
  24.       Left            =   120
  25.       TabIndex        =   0
  26.       Top             =   120
  27.       Width           =   1455
  28.       _ExtentX        =   2566
  29.       _ExtentY        =   3201
  30.       _Version        =   327680
  31.       ListField       =   "Country"
  32.       BoundColumn     =   "country"
  33.    End
  34.    Begin VB.Data datCountries 
  35.       Caption         =   "Countries"
  36.       Connect         =   "Access"
  37.       DatabaseName    =   "MEGACTY2.MDB"
  38.       DefaultCursorType=   0  'DefaultCursor
  39.       DefaultType     =   2  'UseODBC
  40.       Exclusive       =   0   'False
  41.       Height          =   345
  42.       Left            =   1800
  43.       Options         =   0
  44.       ReadOnly        =   0   'False
  45.       RecordsetType   =   1  'Dynaset
  46.       RecordSource    =   "Countries"
  47.       Top             =   1560
  48.       Visible         =   0   'False
  49.       Width           =   2055
  50.    End
  51.    Begin VB.Label lblUnit 
  52.       BorderStyle     =   1  'Fixed Single
  53.       Height          =   255
  54.       Left            =   2760
  55.       TabIndex        =   3
  56.       Top             =   1080
  57.       Width           =   1095
  58.    End
  59.    Begin VB.Label lblCurrency 
  60.       Caption         =   "Currency:"
  61.       Height          =   255
  62.       Left            =   1800
  63.       TabIndex        =   2
  64.       Top             =   1080
  65.       Width           =   735
  66.    End
  67. Attribute VB_Name = "frmCountries"
  68. Attribute VB_GlobalNameSpace = False
  69. Attribute VB_Creatable = False
  70. Attribute VB_PredeclaredId = True
  71. Attribute VB_Exposed = False
  72. Private Sub cmdSort_Click()
  73.   datCountries.RecordSource = "SELECT * FROM Countries " & _
  74.                               "ORDER by pop1995 DESC"
  75.   datCountries.Refresh
  76. End Sub
  77. Private Sub dblCountries_dblClick()
  78.   datCountries.Recordset.FindFirst _
  79.                        "Country =" & "'" & dblCountries.Text & "'"
  80.   lblUnit.Caption = datCountries.Recordset.Fields("currency").Value
  81. End Sub
  82. Private Sub Form_Load()
  83.   datCountries.DatabaseName = App.Path & "\MEGACTY2.MDB"
  84. End Sub
  85.