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

📄 form2.frm

📁 我自己编的
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Height          =   495
         Left            =   -69840
         TabIndex        =   6
         Top             =   2760
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "Form2.frx":00CB
         Left            =   -73680
         List            =   "Form2.frx":00CD
         TabIndex        =   5
         Text            =   "Combo1"
         Top             =   3600
         Width           =   1095
      End
      Begin VB.TextBox Text2 
         Height          =   495
         Left            =   -71880
         TabIndex        =   4
         Top             =   2760
         Width           =   1335
      End
      Begin VB.TextBox Text1 
         Height          =   495
         Left            =   -73680
         TabIndex        =   3
         Top             =   2760
         Width           =   1335
      End
      Begin MSDataGridLib.DataGrid DataGrid2 
         Bindings        =   "Form2.frx":00CF
         Height          =   1935
         Left            =   -74880
         TabIndex        =   2
         Top             =   360
         Width           =   10455
         _ExtentX        =   18441
         _ExtentY        =   3413
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "Form2.frx":00E4
         Height          =   3015
         Left            =   -74640
         TabIndex        =   1
         Top             =   360
         Width           =   10215
         _ExtentX        =   18018
         _ExtentY        =   5318
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   3
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
            BeginProperty Column02 
            EndProperty
         EndProperty
      End
      Begin VB.Label Label4 
         Caption         =   "呵呵!俺打补丁成攻"
         Height          =   255
         Left            =   -71880
         TabIndex        =   43
         Top             =   5280
         Width           =   1815
      End
      Begin VB.Label Label2 
         Caption         =   "房间号"
         Height          =   255
         Left            =   -71520
         TabIndex        =   8
         Top             =   2400
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "病人姓名"
         Height          =   255
         Left            =   -73440
         TabIndex        =   7
         Top             =   2400
         Width           =   1095
      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()
If Text1.Text = "" And Text2.Text = "" Then
 MsgBox "请输入数据"
ElseIf Text1.Text <> "" And Text2.Text = "" Then
Adodc1.RecordSource = "select * from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名 and 病人信息.病人姓名='" & Text1.Text & "'"
ElseIf Text1.Text = "" And Text2.Text <> "" Then
Adodc1.RecordSource = "select * from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名 and 床位.房间号='" & Text2.Text & "'"
ElseIf Text1.Text <> "" And Text2.Text <> " " Then
Adodc1.RecordSource = "select * from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名 and 病人信息.病人姓名='" & Text1.Text & "'and 床位.房间号='" & Text2.Text & "'"
End If
Adodc1.Refresh
End Sub

Private Sub Command2_Click()
Adodc1.RecordSource = "select * from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名 and 病人信息.病人姓名='" & Text5.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.Delete
MsgBox "删除", vbExclamation, "提示"
Text5.Text = ""
Else
MsgBox "没有此记录", vbExclamation, "提示"
End If
Adodc1.RecordSource = "select * from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名"
Adodc1.Refresh
End Sub

Private Sub Command3_Click()
Adodc1.Recordset.AddNew
For i = 0 To 5
Adodc1.Recordset.Fields(i).Value = Text3(i).Text
Next i
Adodc1.Recordset.Fields(6).Value = Text3(0).Text
Adodc1.Recordset.Fields(7).Value = Text3(6).Text
Adodc1.Recordset.Fields(8).Value = Text3(7).Text
Adodc1.Recordset.Update
Adodc1.Refresh
Adodc1.Refresh
Adodc2.Refresh
Adodc3.Refresh
'DataGrid4.Refresh
End Sub

Private Sub Command4_Click()
Adodc2.RecordSource = "select *,所属科室 as 科室 from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名 order by '" & Combo1.Text & "'"
Adodc2.Refresh
Adodc3.Refresh
Adodc1.Refresh
End Sub

Private Sub Command5_Click()
For i = 0 To 5
Adodc3.Recordset.Fields(i).Value = Text4(i).Text
Next i
Adodc3.Recordset.Fields(6).Value = Text4(0).Text
Adodc3.Recordset.Fields(7).Value = Text4(6).Text
Adodc3.Recordset.Fields(8).Value = Text4(7).Text
Adodc3.Recordset.Update
Adodc3.Refresh
Adodc3.Refresh
Adodc2.Refresh
Adodc1.Refresh
End Sub

Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\病人.mdb"
Adodc1.RecordSource = "select * from 病人信息,床位  where 病人信息.病人姓名=床位.病人姓名 "
Adodc1.Refresh
Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\病人.mdb"
Adodc3.RecordSource = "select * from 病人信息,床位  where 病人信息.病人姓名=床位.病人姓名 "
Adodc3.Refresh
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\病人.mdb"
Adodc2.RecordSource = "select *,所属科室 as 科室 from 病人信息,床位 where 病人信息.病人姓名=床位.病人姓名"
Adodc2.Refresh
For i = 0 To Adodc2.Recordset.Fields.Count - 1
   Combo1.List(i) = Adodc2.Recordset.Fields(i).Name
Next i

End Sub

Private Sub Frame3_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

⌨️ 快捷键说明

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