VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2700
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   5040
   LinkTopic       =   "Form1"
   ScaleHeight     =   2700
   ScaleWidth      =   5040
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "放弃"
      Height          =   315
      Left            =   2520
      TabIndex        =   15
      Top             =   2400
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   315
      Left            =   1200
      TabIndex        =   14
      Top             =   2400
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.ComboBox Combo1 
      DataField       =   "专业"
      DataSource      =   "Data1"
      Height          =   300
      ItemData        =   "sy11-07.frx":0000
      Left            =   540
      List            =   "sy11-07.frx":0010
      TabIndex        =   13
      Text            =   "数学"
      Top             =   900
      Width           =   1335
   End
   Begin VB.TextBox Text7 
      DataField       =   "备注"
      DataSource      =   "Data1"
      Height          =   975
      Left            =   360
      TabIndex        =   12
      Top             =   1320
      Width           =   4515
   End
   Begin VB.TextBox Text1 
      DataField       =   "学号"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   540
      TabIndex        =   4
      Top             =   0
      Width           =   1275
   End
   Begin VB.TextBox Text2 
      DataField       =   "姓名"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   2280
      TabIndex        =   3
      Top             =   0
      Width           =   1575
   End
   Begin VB.TextBox Text4 
      DataField       =   "家庭地址"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   2760
      TabIndex        =   2
      Top             =   840
      Width           =   2115
   End
   Begin VB.TextBox Text5 
      DataField       =   "出生年月"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   2280
      TabIndex        =   1
      Top             =   420
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      DataField       =   "性别"
      DataSource      =   "Data1"
      Height          =   375
      Left            =   540
      TabIndex        =   0
      Top             =   420
      Width           =   375
   End
   Begin VB.Data Data1 
      Align           =   2  'Align Bottom
      Caption         =   "基本情况"
      Connect         =   "Access"
      DatabaseName    =   "E:\VB6.0实验指导与测试\Mydb.mdb"
      DefaultCursorType=   1  'ODBC 游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   0
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   0  'Table
      RecordSource    =   "student"
      Top             =   2355
      Width           =   5040
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      DataField       =   "照片"
      DataSource      =   "Data1"
      Height          =   855
      Left            =   4020
      Top             =   0
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "备注"
      Height          =   495
      Index           =   6
      Left            =   0
      TabIndex        =   11
      Top             =   1380
      Width           =   195
   End
   Begin VB.Label Label1 
      Caption         =   "家庭地址"
      Height          =   255
      Index           =   5
      Left            =   1980
      TabIndex        =   10
      Top             =   900
      Width           =   795
   End
   Begin VB.Label Label1 
      Caption         =   "姓名"
      Height          =   255
      Index           =   1
      Left            =   1860
      TabIndex        =   9
      Top             =   120
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "专业"
      Height          =   255
      Index           =   2
      Left            =   0
      TabIndex        =   8
      Top             =   900
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "年龄"
      Height          =   255
      Index           =   3
      Left            =   1860
      TabIndex        =   7
      Top             =   480
      Width           =   495
   End
   Begin VB.Label Label1 
      Caption         =   "性别"
      Height          =   255
      Index           =   4
      Left            =   60
      TabIndex        =   6
      Top             =   480
      Width           =   405
   End
   Begin VB.Label Label1 
      Caption         =   "学号"
      Height          =   255
      Index           =   0
      Left            =   60
      TabIndex        =   5
      Top             =   120
      Width           =   495
   End
   Begin VB.Menu madd 
      Caption         =   "增加"
   End
   Begin VB.Menu mdel 
      Caption         =   "删除"
   End
   Begin VB.Menu mpre 
      Caption         =   "上一条"
   End
   Begin VB.Menu mnext 
      Caption         =   "下一条"
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mbookmark As String
Private Sub Command1_Click()
    Data1.Recordset.Update
    Data1.Recordset.MoveLast    '移动记录指针，刷新显示屏
    '或使用LastModified属性移动记录指针
    'Data1.Recordset.Bookmark = Data1.Recordset.LastModified
    Command1.Visible = False
    Command2.Visible = False
End Sub

Private Sub Command2_Click()
    Data1.UpdateControls                       ' 调用UpdateControls方法放弃输入
    Command1.Visible = False
    Command2.Visible = False
    Data1.Recordset.Bookmark = mbookmark
End Sub
Private Sub madd_Click()
    Data1.Recordset.AddNew                      ' 调用AddNew方法
    Command1.Visible = True                     ' 显示确认按钮
    Command2.Visible = True                     ' 显示放弃按钮
    mbookmark = Data1.Recordset.Bookmark
End Sub

Private Sub mdel_Click()
    Data1.Recordset.Delete                      ' 删除当前记录
    Data1.Recordset.MoveNext                    ' 移动记录指针，刷新显示屏
    If Data1.Recordset.EOF Then Data1.Recordset.MoveLast
End Sub

Private Sub mpre_Click()
    Data1.Recordset.MovePrevious                    ' 上移一条记录
    If Data1.Recordset.BOF Then Data1.Recordset.MoveFirst
End Sub

Private Sub mnext_Click()
    Data1.Recordset.MoveNext                    ' 下移一条记录
    If Data1.Recordset.EOF Then Data1.Recordset.MoveLast
End Sub
Private Sub Form_Click()
    Form2.Show
End Sub

Private Sub Form_Load()
    Data1.DatabaseName = App.Path + "\mydb.mdb"
End Sub
Private Sub Image1_Click()
    Image1.Picture = Clipboard.GetData
End Sub

