home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
- Begin VB.Form frm12_3_1
- Caption = "Megacities"
- ClientHeight = 3615
- ClientLeft = 1095
- ClientTop = 1515
- ClientWidth = 5115
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3615
- ScaleWidth = 5115
- Begin MSFlexGridLib.MSFlexGrid msgCities
- Bindings = "12-3-1.frx":0000
- Height = 2895
- Left = 600
- TabIndex = 1
- Top = 120
- Width = 4215
- _ExtentX = 7435
- _ExtentY = 5106
- _Version = 393216
- FixedCols = 0
- End
- Begin VB.Data datCities
- Caption = "Large World Cities"
- Connect = "Access"
- DatabaseName = "Megacty2.mdb"
- DefaultCursorType= 0 'DefaultCursor
- DefaultType = 2 'UseODBC
- Exclusive = 0 'False
- Height = 390
- Left = 120
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "Cities"
- Top = 3120
- Width = 2412
- End
- Begin VB.CommandButton cmdShow
- Caption = "Show City, Country, Currency"
- Height = 375
- Left = 2640
- TabIndex = 0
- Top = 3120
- Width = 2412
- End
- Attribute VB_Name = "frm12_3_1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdShow_Click()
- If cmdShow.Caption = "Show City, Country, Currency" Then
- 'Join the two tables and display cities, countries, and currency
- datCities.RecordSource = "SELECT city, Cities.country, currency FROM " & _
- "Cities INNER JOIN Countries ON Countries.country = Cities.country " & _
- "ORDER BY city"
- datCities.Refresh
- cmdShow.Caption = "Show City, Country, Populations"
- Else
- datCities.RecordSource = "cities"
- datCities.Refresh
- cmdShow.Caption = "Show City, Country, Currency"
- End If
- End Sub
- Private Sub Form_Load()
- datCities.DatabaseName = App.Path & "\megacty2.mdb"
- msgCities.ColWidth(0) = 1000 'Widen the first column slightly
- End Sub
-