home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form form4
- Caption = "Form3"
- ClientHeight = 3960
- ClientLeft = 1620
- ClientTop = 2370
- ClientWidth = 6690
- Height = 4365
- Left = 1560
- LinkTopic = "Form5"
- ScaleHeight = 3960
- ScaleWidth = 6690
- Top = 2025
- Width = 6810
- Begin VB.Data Data1
- Caption = "Data1"
- Connect = "Access"
- DatabaseName = ""
- Exclusive = 0 'False
- Height = 300
- Left = 1140
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = ""
- Top = 3600
- Width = 1155
- End
- Begin VB.ComboBox comfield
- Height = 315
- Left = 1560
- TabIndex = 1
- Text = "Combo1"
- Top = 3120
- Width = 1215
- End
- Begin VB.Label lblfield
- Caption = "Order By"
- Height = 285
- Left = 130
- TabIndex = 2
- Top = 3130
- Width = 1215
- End
- Begin MSDBGrid.DBGrid DBGrid1
- Bindings = "frm527.frx":0000
- Height = 2895
- Left = 0
- OleObjectBlob = "frm527.frx":000E
- TabIndex = 0
- Top = 60
- Width = 6675
- End
- Attribute VB_Name = "form4"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub comfield_Click()
- If comfield.TEXT <> "Comments" Then
- Data1.RecordSource = "select * From titles order by [" & comfield.TEXT & "]"
- Data1.Refresh
- End If
- End Sub
- Private Sub Form_Load()
- Dim filepath As String
- Dim x As Integer
- filepath = "\source\chp27"
- Data1.DatabaseName = filepath & "biblio.mdb"
- Data1.RecordSource = "select * From titles order by pubid ,[year published]"
- Data1.Refresh
- For x = 0 To Data1.Recordset.Fields.Count - 1
- comfield.AddItem Data1.Recordset.Fields(x).Name
- Next x
- End Sub
-