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

📄 frmquery.frm

📁 一个比较简单的由VB+Access开发的系统,请慢看
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmquery 
   BackColor       =   &H00404040&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "门诊收费查询"
   ClientHeight    =   2595
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6735
   Icon            =   "frmquery.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Picture         =   "frmquery.frx":030A
   ScaleHeight     =   2595
   ScaleWidth      =   6735
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox Picture2 
      Height          =   1400
      Left            =   120
      Picture         =   "frmquery.frx":59F9
      ScaleHeight     =   1335
      ScaleWidth      =   6435
      TabIndex        =   12
      Top             =   1080
      Width           =   6495
      Begin VB.TextBox Text3 
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   1000
         Locked          =   -1  'True
         TabIndex        =   3
         Top             =   120
         Width           =   1400
      End
      Begin VB.TextBox Text4 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   3360
         Locked          =   -1  'True
         TabIndex        =   6
         Top             =   120
         Width           =   1000
      End
      Begin VB.TextBox Text5 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   5280
         Locked          =   -1  'True
         TabIndex        =   8
         Top             =   120
         Width           =   1000
      End
      Begin VB.TextBox Text6 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         BeginProperty DataFormat 
            Type            =   1
            Format          =   "yyyy""年""M""月""d""日"""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   3
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   1000
         Locked          =   -1  'True
         TabIndex        =   4
         Top             =   480
         Width           =   1400
      End
      Begin VB.TextBox Text7 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   3360
         Locked          =   -1  'True
         TabIndex        =   7
         Top             =   480
         Width           =   1000
      End
      Begin VB.TextBox Text8 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   5280
         Locked          =   -1  'True
         TabIndex        =   9
         Top             =   480
         Width           =   1000
      End
      Begin VB.CommandButton Command2 
         Caption         =   "关闭&(C)"
         Height          =   300
         HelpContextID   =   1
         Left            =   5325
         TabIndex        =   2
         Top             =   915
         Width           =   1000
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   2640
         Top             =   840
         Visible         =   0   'False
         Width           =   1200
         _ExtentX        =   2117
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         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.Label Label3 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "科室类别"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   200
         TabIndex        =   19
         Top             =   165
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "帐户支付"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   2600
         TabIndex        =   18
         Top             =   165
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "费用合计"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   4500
         TabIndex        =   17
         Top             =   165
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "就诊日期"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   200
         TabIndex        =   16
         Top             =   555
         Width           =   720
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "现金支付"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   2600
         TabIndex        =   15
         Top             =   555
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "收费人员"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   4500
         TabIndex        =   14
         Top             =   555
         Width           =   720
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "现金单位:人民币(元)"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   200
         TabIndex        =   13
         Top             =   960
         Width           =   1800
      End
   End
   Begin VB.PictureBox Picture1 
      Height          =   855
      Left            =   120
      Picture         =   "frmquery.frx":B0E8
      ScaleHeight     =   795
      ScaleWidth      =   6435
      TabIndex        =   5
      Top             =   120
      Width           =   6495
      Begin VB.TextBox Text2 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   4200
         MaxLength       =   10
         TabIndex        =   1
         Top             =   240
         Width           =   1000
      End
      Begin VB.TextBox Text1 
         Alignment       =   1  'Right Justify
         BackColor       =   &H00FFFFFF&
         ForeColor       =   &H000000FF&
         Height          =   300
         Left            =   1920
         MaxLength       =   10
         TabIndex        =   0
         Top             =   240
         Width           =   1000
      End
      Begin VB.Label Label1 
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "门诊序号"
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   1080
         TabIndex        =   11
         Top             =   285
         Width           =   735
      End
      Begin VB.Label Label2 
         BackColor       =   &H00404040&
         BackStyle       =   0  'Transparent
         Caption         =   "患者姓名"
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   3360
         TabIndex        =   10
         Top             =   285
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmquery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
'门诊数据删除后必须更新门诊序号
frmquery.Top = (frmmain.Height - frmquery.Height) / 2 - 500
frmquery.Left = (frmmain.Width - frmquery.Width) / 2
Dim riqi As Date
On Error GoTo err3
Adodc1.ConnectionString = frmlogin.conn
Exit Sub
err3:
MsgBox "数据库连接失败!"
End Sub



Private Sub Text1_Change()
On Error GoTo err1
With Adodc1
.RecordSource = "select * from mzsf where 序号=" & Text1.Text
.Refresh
If .Recordset.AbsolutePosition <> adPosUnknown Then
Text2.Text = .Recordset.Fields("患者姓名")
Text3.Text = .Recordset.Fields("科室类别")
Text4.Text = .Recordset.Fields("帐户支付")
Text5.Text = .Recordset.Fields("费用合计")
riqi = .Recordset.Fields("就诊日期")
Text6.Text = Year(riqi) & "年" & Month(riqi) & "月" & Day(riqi) & "日"
Text7.Text = .Recordset.Fields("现金支付")
Text8.Text = .Recordset.Fields("收费员")
Else
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End If
End With
Exit Sub
err1:
MsgBox "输入数据类型不匹配!"
End Sub

Private Sub Text2_Change()
On Error GoTo err2
With Adodc1
.RecordSource = "select * from mzsf where 患者姓名='" & Text2.Text & "'"
.Refresh
If .Recordset.AbsolutePosition <> adPosUnknown Then
Text1.Text = .Recordset.Fields("序号")
Text3.Text = .Recordset.Fields("科室类别")
Text4.Text = .Recordset.Fields("帐户支付")
Text5.Text = .Recordset.Fields("费用合计")
riqi = .Recordset.Fields("就诊日期")
Text6.Text = Year(riqi) & "年" & Month(riqi) & "月" & Day(riqi) & "日"
Text7.Text = .Recordset.Fields("现金支付")
Text8.Text = .Recordset.Fields("收费员")
Else
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End If
End With
Exit Sub
err2:
MsgBox "输入数据类型不匹配!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmquery.Caption
End Sub
Private Sub Text1_GotFocus()
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub
Private Sub Text2_GotFocus()
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End Sub

⌨️ 快捷键说明

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