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

📄 form10.frm

📁 现在我国的多数诊所或小型医院的管理水平还停留在纸介质的基础上
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form10 
   Caption         =   "科室名称编辑"
   ClientHeight    =   3510
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6090
   LinkTopic       =   "Form3"
   ScaleHeight     =   3510
   ScaleWidth      =   6090
   StartUpPosition =   1  '所有者中心
   Begin VB.CheckBox ck 
      Caption         =   "连续增加"
      Height          =   375
      Left            =   240
      TabIndex        =   4
      Top             =   2640
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退  出"
      Height          =   495
      Left            =   4320
      TabIndex        =   3
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保  存"
      Height          =   495
      Left            =   2760
      TabIndex        =   2
      Top             =   2520
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1560
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   720
      Width           =   1695
   End
   Begin VB.Label label1 
      Caption         =   "科室名称"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   480
      TabIndex        =   1
      Top             =   720
      Width           =   975
   End
End
Attribute VB_Name = "Form10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim t_ As String
Public Sub setType(t As String)
t_ = t
End Sub

Private Sub Command1_Click()
If Trim(Text1) = "" Then
Text1.SetFocus
End If

If t_ = "add" Then
If rec_comm.State = adStateOpen Then
rec_comm.AddNew
rec_comm.Fields("科室名称") = Trim(Text1)
rec_comm.Update
End If
End If

If t_ = "modify" Then
If rec_comm.State = adStateOpen Then
rec_comm.Fields("科室名称") = Trim(Text1)
rec_comm.Update
End If
End If
If ck.Value <> 1 Then
Unload Me
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
't_ = "add"
Text1 = ""
Text2 = ""

If t_ = "modify" Then
If rec_comm.State = adStateOpen And Not rec_comm.EOF And Not rec_comm.BOF Then
Text1 = rec_comm.Fields("科室名称")
End If
ck.Visible = False
End If

End Sub

Private Sub Label2_Click()

End Sub

⌨️ 快捷键说明

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