⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form2.frm

📁 vb数据库编程资料
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   2760
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5190
   LinkTopic       =   "Form2"
   ScaleHeight     =   2760
   ScaleWidth      =   5190
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   375
      Left            =   2880
      TabIndex        =   15
      Top             =   2280
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "更新"
      Height          =   375
      Left            =   960
      TabIndex        =   14
      Top             =   2280
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1200
      TabIndex        =   13
      Top             =   1800
      Width           =   1215
   End
   Begin VB.ComboBox Combo3 
      Height          =   300
      ItemData        =   "Form2.frx":0000
      Left            =   3600
      List            =   "Form2.frx":0010
      TabIndex        =   11
      Text            =   "Combo3"
      Top             =   1320
      Width           =   1335
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      ItemData        =   "Form2.frx":0048
      Left            =   1200
      List            =   "Form2.frx":0058
      TabIndex        =   9
      Text            =   "Combo2"
      Top             =   1320
      Width           =   1335
   End
   Begin VB.TextBox Text3 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "yyyy-M-d"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   3
      EndProperty
      Height          =   375
      Left            =   3600
      TabIndex        =   7
      Text            =   "Text3"
      Top             =   840
      Width           =   1335
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "Form2.frx":0076
      Left            =   1200
      List            =   "Form2.frx":0080
      TabIndex        =   5
      Text            =   "Combo1"
      Top             =   840
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   3600
      TabIndex        =   3
      Top             =   240
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1200
      TabIndex        =   1
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label7 
      Caption         =   "工资:"
      Height          =   375
      Left            =   240
      TabIndex        =   12
      Top             =   1800
      Width           =   615
   End
   Begin VB.Label Label6 
      Caption         =   "单位:"
      Height          =   255
      Left            =   2640
      TabIndex        =   10
      Top             =   1320
      Width           =   735
   End
   Begin VB.Label Label5 
      Caption         =   "职称:"
      Height          =   375
      Left            =   240
      TabIndex        =   8
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "出生日期:"
      Height          =   255
      Left            =   2640
      TabIndex        =   6
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "性别:"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   840
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "姓名:"
      Height          =   255
      Left            =   2640
      TabIndex        =   2
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "教师编号:"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Form1.Data1.Recordset.Edit
  Form1.Data1.Recordset.Fields("教师编号") = Text1.Text
  Form1.Data1.Recordset.Fields("姓名") = Text2.Text
  Form1.Data1.Recordset.Fields("性别") = Combo1.Text
  Form1.Data1.Recordset.Fields("出年日期") = Text3.Text
  Form1.Data1.Recordset.Fields("职称") = Combo2.Text
  Combo3.Text = Form1.Data1.Recordset.Fields("单位") = Combo3.Text
  Form1.Data1.Recordset.Fields("工资") = Text4.Text
  Form1.Data1.Recordset.Update
  Form1.Data1.Refresh
End Sub

Private Sub Command2_Click()
  Unload Form2
End Sub

Private Sub Form_Load()
  Text1.Text = Form1.Data1.Recordset.Fields("教师编号")
  Text2.Text = Form1.Data1.Recordset.Fields("姓名")
  Combo1.Text = Form1.Data1.Recordset.Fields("性别")
  Text3.Text = Form1.Data1.Recordset.Fields("出年日期")
  Combo2.Text = Form1.Data1.Recordset.Fields("职称")
  Combo3.Text = Form1.Data1.Recordset.Fields("单位")
  Text4.Text = Form1.Data1.Recordset.Fields("工资")
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -