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

📄 病历-添加.frm

📁 简易的病历管理 在VB6.0下编辑
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form2 
   Caption         =   "添加病历文档"
   ClientHeight    =   7215
   ClientLeft      =   4650
   ClientTop       =   2430
   ClientWidth     =   6645
   Icon            =   "病历-添加.frx":0000
   LinkTopic       =   "Form2"
   ScaleHeight     =   7215
   ScaleWidth      =   6645
   Begin VB.Frame Frame3 
      Caption         =   " 添加档案 "
      Height          =   6975
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6375
      Begin VB.TextBox Text2 
         Height          =   375
         Index           =   9
         Left            =   3240
         TabIndex        =   8
         Top             =   1680
         Width           =   615
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Index           =   8
         Left            =   2160
         TabIndex        =   7
         Top             =   1680
         Width           =   495
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Index           =   7
         Left            =   840
         TabIndex        =   6
         Top             =   1680
         Width           =   855
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   375
         Left            =   4320
         Top             =   3480
         Visible         =   0   'False
         Width           =   1935
         _ExtentX        =   3413
         _ExtentY        =   661
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   2
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database1.dat;Persist Security Info=False"
         OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database1.dat;Persist Security Info=False"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "main"
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.TextBox Text2 
         DataField       =   "性别"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   2
         Left            =   1440
         Locked          =   -1  'True
         TabIndex        =   23
         Top             =   3600
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.OptionButton Option2 
         Caption         =   "女"
         Height          =   255
         Left            =   1680
         TabIndex        =   4
         Top             =   1080
         Width           =   495
      End
      Begin VB.OptionButton Option1 
         Caption         =   "男"
         Height          =   255
         Left            =   960
         TabIndex        =   3
         Top             =   1080
         Width           =   495
      End
      Begin VB.CommandButton Command3 
         Caption         =   "取消"
         Height          =   375
         Left            =   4560
         TabIndex        =   13
         Top             =   6240
         Width           =   1455
      End
      Begin VB.CommandButton Command2 
         Caption         =   "重置"
         Height          =   375
         Left            =   4560
         TabIndex        =   12
         Top             =   5640
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   375
         Left            =   4560
         TabIndex        =   11
         Top             =   5040
         Width           =   1455
      End
      Begin VB.TextBox Text2 
         DataField       =   "备注"
         DataSource      =   "Adodc1"
         Height          =   2055
         Index           =   6
         Left            =   840
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   10
         Top             =   4800
         Width           =   3255
      End
      Begin VB.TextBox Text2 
         DataField       =   "病史"
         DataSource      =   "Adodc1"
         Height          =   2055
         Index           =   5
         Left            =   840
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   9
         Top             =   2460
         Width           =   3255
      End
      Begin VB.TextBox Text2 
         DataField       =   "入院时间"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   4
         Left            =   840
         TabIndex        =   14
         Top             =   2160
         Visible         =   0   'False
         Width           =   3255
      End
      Begin VB.TextBox Text2 
         DataField       =   "年龄"
         DataSource      =   "Adodc1"
         Height          =   375
         Index           =   3
         Left            =   2880
         TabIndex        =   5
         Top             =   960
         Width           =   1215
      End
      Begin VB.TextBox Text2 
         DataField       =   "姓名"
         DataSource      =   "Adodc1"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   1
         Left            =   840
         TabIndex        =   1
         Top             =   240
         Width           =   1815
      End
      Begin VB.TextBox Text2 
         DataField       =   "ID"
         DataSource      =   "Adodc1"
         Enabled         =   0   'False
         Height          =   375
         Index           =   0
         Left            =   3120
         TabIndex        =   2
         Top             =   240
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "日"
         Height          =   255
         Left            =   3960
         TabIndex        =   26
         Top             =   1800
         Width           =   255
      End
      Begin VB.Label Label4 
         Caption         =   "月"
         Height          =   255
         Left            =   2880
         TabIndex        =   25
         Top             =   1800
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "年"
         Height          =   255
         Left            =   1800
         TabIndex        =   24
         Top             =   1800
         Width           =   255
      End
      Begin VB.Label Label1 
         Height          =   4095
         Left            =   4320
         TabIndex        =   22
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label3 
         Caption         =   "ID:"
         Height          =   255
         Index           =   0
         Left            =   2760
         TabIndex        =   21
         Top             =   360
         Width           =   255
      End
      Begin VB.Label Label3 
         Caption         =   "姓名:"
         Height          =   255
         Index           =   2
         Left            =   240
         TabIndex        =   20
         Top             =   360
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "性别:"
         Height          =   255
         Index           =   3
         Left            =   240
         TabIndex        =   19
         Top             =   1080
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "年龄:"
         Height          =   255
         Index           =   4
         Left            =   2280
         TabIndex        =   18
         Top             =   1080
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "入院时间"
         Height          =   375
         Index           =   5
         Left            =   240
         TabIndex        =   17
         Top             =   1680
         Width           =   375
      End
      Begin VB.Label Label3 
         Caption         =   "病史:"
         Height          =   255
         Index           =   6
         Left            =   240
         TabIndex        =   16
         Top             =   2520
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "备注:"
         Height          =   255
         Index           =   7
         Left            =   240
         TabIndex        =   15
         Top             =   4920
         Width           =   495
      End
   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()
On Error GoTo adderrer
Text2(4).Text = Text2(7).Text & "-" & Text2(8).Text & "-" & Text2(9).Text
If Text2(1) = "" Or Text2(2) = "" Or Text2(3) = "" Or Text2(4) = "" Or Text2(5) = "" Or Text2(6) = "" Or Text2(7) < 0 Or Text2(7) > 9999 Or Text2(8) < 0 Or Text2(8) > 12 Or Text2(9) < 0 Or Text2(9) > 31 Then
MsgBox "信息不完整或有错误.,请察正后(看看注意事项)再点确定!!", vbCritical, "温馨提示"
Else
Adodc1.Recordset.UpdateBatch
MsgBox "添加成功", , "恭喜!"
Unload Me
End If
Exit Sub
adderrer:
MsgBox "信息不完整或有错误.,请察正后(看看注意事项)再点确定!!", vbCritical, "温馨提示"
Unload Me
End Sub
Private Sub Command2_Click()
Text2(1) = ""
Text2(2) = ""
Text2(3) = ""
Text2(4) = ""
Text2(5) = ""
Text2(6) = ""
Text2(7) = ""
Text2(8) = ""
Text2(9) = ""
Option1.Value = False
Option2.Value = False
Text2(1).SetFocus
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim bb As Integer
Adodc1.Recordset.MoveLast
bb = Text2(0).Text
bb = Int(bb) + 1
Adodc1.Recordset.AddNew
Text2(0).Text = bb
Label1.Caption = "注意:" & Chr(13) + Chr(13) & "1.ID项为系统自动编号.不必也不能修改.." & Chr(13) + Chr(13) & "2.入院时间格式为XXXX-XX-XX-.." & Chr(13) + Chr(13) & "3.年龄输入框输入字符必须为数字" & Chr(13) + Chr(13) & "4.如有建议..欢迎指正.."
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Adodc1.Refresh
End Sub

Private Sub Option1_Click()
Text2(2).Text = Option1.Caption
End Sub
Private Sub Option2_Click()
Text2(2).Text = Option2.Caption
End Sub
Private Sub Text2_KeyPress(Index As Integer, KeyAscii As Integer)
If Index = 3 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
MsgBox "不要告诉我你用" & Chr(34) + Chr(KeyAscii) + Chr(34) & "代表别人的年龄", vbExclamation, "温馨提示"
KeyAscii = 0
End If
End If
If Index = 7 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
MsgBox "不要告诉我你用" & Chr(34) + Chr(KeyAscii) + Chr(34) & "代表别人的年份", vbExclamation, "温馨提示"
KeyAscii = 0
End If
End If
If Index = 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
MsgBox "不要告诉我你用" & Chr(34) + Chr(KeyAscii) + Chr(34) & "代表别人的月份", vbExclamation, "温馨提示"
KeyAscii = 0
End If
End If
If Index = 9 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
MsgBox "不要告诉我你用" & Chr(34) + Chr(KeyAscii) + Chr(34) & "代表别人的日子", vbExclamation, "温馨提示"
KeyAscii = 0
End If
End If
End Sub

⌨️ 快捷键说明

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