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

📄 dialog.frm

📁 简单的社区卫生服务软件,家庭成员数据库可从计划生育指导站取得,因上传时已清空数据库运行时可能出错。内含dbgrid32.ocx。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Dialog 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "添加记录"
   ClientHeight    =   705
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   3840
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   705
   ScaleWidth      =   3840
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text4 
      DataField       =   "家庭编号"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   1800
      TabIndex        =   6
      Top             =   720
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text3 
      DataField       =   "姓名"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   120
      TabIndex        =   5
      Top             =   720
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.TextBox Text5 
      Height          =   615
      Left            =   120
      TabIndex        =   4
      Top             =   1440
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1680
      TabIndex        =   3
      Top             =   120
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1680
      MaxLength       =   2
      TabIndex        =   2
      Top             =   120
      Visible         =   0   'False
      Width           =   1935
   End
   Begin VB.Data Data1 
      Connect         =   "Access 2000;"
      DatabaseName    =   "健康档案.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   405
      Left            =   240
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "户主"
      Top             =   2400
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "请输入户主姓名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   1
      Top             =   240
      Width           =   1470
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "请输入所在小组"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Visible         =   0   'False
      Width           =   1470
   End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Unload(Cancel As Integer)
Form1.datPrimaryRS.Recordset.FindFirst "姓名 Like " & Chr$(39) & Text2.Text & Chr$(39)
Form1.Show
End Sub


Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Data1.RecordSource = "SELECT * FROM 户主 WHERE 姓名 Like " & Chr$(39) & Text2.Text & Chr$(39)
Data1.Refresh
If Text3.Text = "" Then
Text1.Visible = True
Text2.Visible = False
Label1.Visible = True
Label2.Visible = False
Else
MsgBox ("该户已录入")
Unload Me
End If
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1 < 10 Then
Form1.datPrimaryRS.Recordset.FindLast "家庭编号 Like " & Chr$(39) & "0" & Text1.Text & "*" & Chr$(39)
Text5.Text = "0" & Form1.txtFields(0) + 10
Else
Form1.datPrimaryRS.Recordset.FindLast "家庭编号 Like " & Chr$(39) & Text1.Text & "*" & Chr$(39)
Text5 = Form1.txtFields(0) + 10
End If
Data1.Recordset.AddNew
Text3.Text = Text2.Text
Text4.Text = Text5.Text
Data1.Recordset.Update
Form1.datPrimaryRS.Refresh
Unload Me
End If
End Sub

⌨️ 快捷键说明

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