VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "VB6 例11-09 用SQL显示多表数据"
   ClientHeight    =   1590
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4950
   LinkTopic       =   "Form1"
   ScaleHeight     =   1590
   ScaleWidth      =   4950
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      DataField       =   "学号"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1320
      TabIndex        =   4
      Top             =   60
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      DataField       =   "姓名"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   3540
      TabIndex        =   3
      Top             =   60
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      DataField       =   "课程"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   540
      Width           =   1335
   End
   Begin VB.TextBox Text4 
      DataField       =   "成绩"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   3540
      TabIndex        =   1
      Top             =   540
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      AutoSize        =   -1  'True
      DataField       =   "照片"
      DataSource      =   "Data1"
      Height          =   855
      Left            =   60
      ScaleHeight     =   795
      ScaleWidth      =   675
      TabIndex        =   0
      Top             =   60
      Width           =   735
   End
   Begin VB.Data Data1 
      Align           =   2  'Align Bottom
      Connect         =   "Access"
      DatabaseName    =   "Student.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   1245
      Width           =   4950
   End
   Begin VB.Label Label1 
      Caption         =   "姓名"
      Height          =   255
      Index           =   1
      Left            =   2940
      TabIndex        =   8
      Top             =   180
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "课程"
      Height          =   255
      Index           =   2
      Left            =   840
      TabIndex        =   7
      Top             =   660
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "成绩"
      Height          =   255
      Index           =   3
      Left            =   2940
      TabIndex        =   6
      Top             =   600
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "学号"
      Height          =   255
      Index           =   0
      Left            =   840
      TabIndex        =   5
      Top             =   180
      Width           =   495
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    Dim mpath As String
    mpath = App.Path
    If Right(mpath, 1) <> "\" Then mpath = mpath + "\"
    Data1.DatabaseName = mpath + "student.mdb"
    Data1.RecordSource = "Select 学生成绩表.*, 基本情况.姓名, " _
    & "基本情况.照片 From 学生成绩表, 基本情况 " _
    & "Where 学生成绩表.学号 = 基本情况.学号"
End Sub
Private Sub Data1_Reposition()
    Data1.Caption = Data1.Recordset.AbsolutePosition + 1
End Sub

