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

📄 frmadddoc.frm

📁 这是我大学毕业时作的毕业设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmadddoc 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "录入档案信息"
   ClientHeight    =   4665
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7605
   Icon            =   "frmadddoc.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4665
   ScaleWidth      =   7605
   Begin VB.PictureBox picEditFile 
      AutoSize        =   -1  'True
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   0  'None
      Height          =   240
      Left            =   315
      MouseIcon       =   "frmadddoc.frx":0442
      MousePointer    =   99  'Custom
      Picture         =   "frmadddoc.frx":0594
      ScaleHeight     =   240
      ScaleWidth      =   240
      TabIndex        =   33
      ToolTipText     =   "查看、编辑、打印文件"
      Top             =   90
      Width           =   240
   End
   Begin VB.Frame Frame3 
      Height          =   975
      Left            =   600
      TabIndex        =   10
      Top             =   3360
      Width           =   2655
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   375
         Left            =   1560
         TabIndex        =   12
         Top             =   360
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   360
         Width           =   855
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "详细信息"
      Height          =   4095
      Left            =   3480
      TabIndex        =   9
      Top             =   240
      Width           =   3735
      Begin VB.TextBox Text13 
         Height          =   270
         Left            =   1440
         TabIndex        =   32
         Top             =   3600
         Width           =   1935
      End
      Begin VB.TextBox Text12 
         Height          =   270
         Left            =   1440
         TabIndex        =   31
         Top             =   3240
         Width           =   1935
      End
      Begin VB.TextBox Text11 
         Height          =   270
         Left            =   1440
         TabIndex        =   30
         Top             =   2880
         Width           =   1935
      End
      Begin VB.TextBox Text10 
         Height          =   270
         Left            =   1440
         TabIndex        =   29
         Top             =   2520
         Width           =   1935
      End
      Begin VB.TextBox Text9 
         Height          =   270
         Left            =   1440
         TabIndex        =   28
         Top             =   2160
         Width           =   1935
      End
      Begin VB.TextBox Text8 
         Height          =   270
         Left            =   1440
         TabIndex        =   27
         Top             =   1800
         Width           =   1935
      End
      Begin VB.TextBox Text7 
         Height          =   270
         Left            =   1440
         TabIndex        =   26
         Top             =   1440
         Width           =   1935
      End
      Begin VB.TextBox Text6 
         Height          =   270
         Left            =   1440
         TabIndex        =   25
         Top             =   1080
         Width           =   1935
      End
      Begin VB.TextBox Text5 
         Height          =   270
         Left            =   1440
         TabIndex        =   24
         Top             =   720
         Width           =   1935
      End
      Begin VB.TextBox Text4 
         Height          =   270
         Left            =   1440
         TabIndex        =   23
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label14 
         Caption         =   "过敏史五"
         Height          =   255
         Left            =   240
         TabIndex        =   22
         Top             =   3600
         Width           =   855
      End
      Begin VB.Label Label13 
         Caption         =   "过敏史四"
         Height          =   255
         Left            =   240
         TabIndex        =   21
         Top             =   3240
         Width           =   855
      End
      Begin VB.Label Label12 
         Caption         =   "过敏史三"
         Height          =   255
         Left            =   240
         TabIndex        =   20
         Top             =   2880
         Width           =   855
      End
      Begin VB.Label Label11 
         Caption         =   "过敏史二"
         Height          =   255
         Left            =   240
         TabIndex        =   19
         Top             =   2520
         Width           =   855
      End
      Begin VB.Label Label10 
         Caption         =   "过敏史一"
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   2160
         Width           =   855
      End
      Begin VB.Label Label9 
         Caption         =   "病人病史五"
         Height          =   255
         Left            =   240
         TabIndex        =   17
         Top             =   1800
         Width           =   975
      End
      Begin VB.Label Label8 
         Caption         =   "病人病史四"
         Height          =   255
         Left            =   240
         TabIndex        =   16
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label7 
         Caption         =   "病人病史三"
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "病人病史二"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   720
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "病人病史一"
         Height          =   255
         Left            =   240
         TabIndex        =   13
         Top             =   360
         Width           =   975
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "输入病人信息"
      Height          =   3015
      Left            =   600
      TabIndex        =   0
      Top             =   240
      Width           =   2655
      Begin VB.TextBox Text3 
         Height          =   270
         Left            =   1200
         TabIndex        =   8
         Top             =   1920
         Width           =   1095
      End
      Begin VB.ListBox List1 
         Height          =   240
         ItemData        =   "frmadddoc.frx":06DE
         Left            =   1200
         List            =   "frmadddoc.frx":06E8
         TabIndex        =   6
         Top             =   1440
         Width           =   1095
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H80000018&
         Height          =   270
         Left            =   1200
         Locked          =   -1  'True
         TabIndex        =   4
         Top             =   960
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1200
         TabIndex        =   2
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "病人年龄"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "病人性别"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "病人编号"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "病人姓名"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmadddoc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
    MsgBox "请填写病人姓名!", , "提示"
  Exit Sub
End If

  Conn.Execute "insert into patient(pname,pno,psex,page,phistory1,phistory2,phistory3,phistory4,phistory5,pitem1,pitem2,pitem3,pitem4,pitem5) values('" & Text1.Text & "','" & Text2.Text & "','" & List1.Text & "','" & Text3.Text & "', " _
             & " '" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "','" & Text7.Text & "','" & Text8.Text & "','" & Text9.Text & "', " _
             & " '" & Text10.Text & "','" & Text11.Text & "','" & Text12.Text & "','" & Text13.Text & "')"
    MsgBox "添加档案记录成功", , "提示"
    Pno = Text2.Text
    frmchoseddep.Show
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim temRst As Recordset
Dim strSql As String
Dim NewPno As String
  strSql = "select max(pno) from patient "
  Set temRst = New Recordset
  temRst.Open strSql, Conn, adOpenKeyset, adLockOptimistic
  If Not temRst.EOF And Not temRst.BOF Then
     NewPno = IIf(IsNull(temRst.Fields(0)), 1, temRst.Fields(0) + 1)
  End If
Text2.Text = NewPno
List1.ListIndex = 0
End Sub

⌨️ 快捷键说明

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