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

📄 frm_yzxg.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Frm_yzmd 
   Caption         =   "业主信息修改"
   ClientHeight    =   4395
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6585
   Icon            =   "Frm_yzxg.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   4395
   ScaleWidth      =   6585
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   285
      Index           =   14
      Left            =   4665
      TabIndex        =   36
      Top             =   810
      Width           =   1635
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退 出 "
      Height          =   330
      Left            =   5415
      TabIndex        =   20
      Top             =   3870
      Width           =   1000
   End
   Begin VB.CommandButton Command1 
      Caption         =   "更 新"
      Height          =   330
      Left            =   4425
      TabIndex        =   19
      Top             =   3870
      Width           =   1000
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   405
      Left            =   2895
      Top             =   4605
      Width           =   1560
      _ExtentX        =   2752
      _ExtentY        =   714
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      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.Frame Frame2 
      Caption         =   "业主信息"
      Height          =   3645
      Left            =   120
      TabIndex        =   1
      Top             =   135
      Width           =   6315
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   16
         Left            =   4575
         TabIndex        =   35
         Top             =   2700
         Width           =   1650
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   15
         Left            =   1230
         TabIndex        =   34
         Top             =   2775
         Width           =   2205
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   13
         Left            =   4365
         TabIndex        =   33
         Top             =   3195
         Width           =   1830
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   12
         Left            =   1335
         TabIndex        =   32
         Top             =   3225
         Width           =   1710
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   11
         Left            =   4560
         TabIndex        =   31
         Top             =   2340
         Width           =   1650
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   10
         Left            =   4560
         TabIndex        =   30
         Top             =   1950
         Width           =   1650
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   9
         Left            =   4545
         TabIndex        =   29
         Top             =   1065
         Width           =   1650
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   8
         Left            =   4545
         TabIndex        =   28
         Top             =   300
         Width           =   1650
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   7
         Left            =   1080
         TabIndex        =   27
         Top             =   2325
         Width           =   2400
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   6
         Left            =   4560
         TabIndex        =   26
         Top             =   1500
         Width           =   1650
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   5
         Left            =   1080
         TabIndex        =   25
         Top             =   1485
         Width           =   2385
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   4
         Left            =   1080
         TabIndex        =   24
         Top             =   1095
         Width           =   2385
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   3
         Left            =   1080
         TabIndex        =   23
         Top             =   1890
         Width           =   2415
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Index           =   2
         Left            =   2670
         TabIndex        =   0
         Top             =   720
         Width           =   810
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   285
         Index           =   1
         Left            =   1080
         TabIndex        =   22
         Top             =   705
         Width           =   990
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   285
         Index           =   0
         Left            =   1080
         Locked          =   -1  'True
         TabIndex        =   21
         Top             =   300
         Width           =   2385
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "业主代号:"
         Height          =   180
         Left            =   105
         TabIndex        =   18
         Top             =   375
         Width           =   900
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "业主姓名:"
         Height          =   180
         Left            =   105
         TabIndex        =   17
         Top             =   765
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "手  机:"
         Height          =   180
         Left            =   105
         TabIndex        =   16
         Top             =   1140
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "电  话:"
         Height          =   180
         Left            =   105
         TabIndex        =   15
         Top             =   1575
         Width           =   720
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "联系地址:"
         Height          =   180
         Left            =   105
         TabIndex        =   14
         Top             =   1965
         Width           =   900
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "单位电话:"
         Height          =   180
         Left            =   105
         TabIndex        =   13
         Top             =   2385
         Width           =   900
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         Caption         =   "性别:"
         Height          =   180
         Left            =   2160
         TabIndex        =   12
         Top             =   765
         Width           =   540
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "证件名称:"
         Height          =   180
         Left            =   3660
         TabIndex        =   11
         Top             =   345
         Width           =   900
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         Caption         =   "是否进入:"
         Height          =   180
         Left            =   3660
         TabIndex        =   10
         Top             =   735
         Width           =   900
      End
      Begin VB.Label Label14 
         AutoSize        =   -1  'True
         Caption         =   "证件号码:"
         Height          =   180
         Left            =   3660
         TabIndex        =   9
         Top             =   1155
         Width           =   900
      End
      Begin VB.Label Label15 
         AutoSize        =   -1  'True
         Caption         =   "工作单位:"
         Height          =   180
         Left            =   3660
         TabIndex        =   8
         Top             =   1560
         Width           =   900
      End
      Begin VB.Label Label16 
         AutoSize        =   -1  'True
         Caption         =   "签约日期:"
         Height          =   180
         Left            =   3660
         TabIndex        =   7
         Top             =   1995
         Width           =   900
      End
      Begin VB.Label Label17 
         AutoSize        =   -1  'True
         Caption         =   "进住日期:"
         Height          =   180
         Left            =   3660
         TabIndex        =   6
         Top             =   2370
         Width           =   900
      End
      Begin VB.Label Label18 
         AutoSize        =   -1  'True
         Caption         =   "进住起始日期:"
         Height          =   180
         Left            =   105
         TabIndex        =   5
         Top             =   3270
         Width           =   1260
      End
      Begin VB.Label Label19 
         AutoSize        =   -1  'True
         Caption         =   "进住截止日期:"
         Height          =   180
         Left            =   3105
         TabIndex        =   4
         Top             =   3255
         Width           =   1260
      End
      Begin VB.Label Label20 
         AutoSize        =   -1  'True
         Caption         =   "合同书编号:"
         Height          =   180
         Left            =   105
         TabIndex        =   3
         Top             =   2835
         Width           =   1080
      End
      Begin VB.Label Label21 
         AutoSize        =   -1  'True
         Caption         =   "协议书编号:"
         Height          =   180
         Left            =   3510
         TabIndex        =   2
         Top             =   2760
         Width           =   1080
      End
   End
End
Attribute VB_Name = "Frm_yzmd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()   '更新
    For q = 1 To 16
        If Text1(q).Text = "" Then
            MsgBox "输入系统不能为空!", , "系统提示"
            Exit Sub
        End If
    Next q

    Dim i As Integer
    '打开对象
    adors.Open "select * from tab_yzinfo where 业主代号='" + Text1(0).Text + "'", cn, adOpenKeyset, adLockOptimistic
    With adors
        If .RecordCount > 0 Then
            For i = 0 To 16
                .Fields(i) = Text1(i).Text
            Next i
            .Update
            Dim rs1 As New ADODB.Recordset
            rs1.Open "select * from tab_fwinfo where 房间编号='" + Text1(0).Text + "'", cn, adOpenKeyset, adLockOptimistic
            If rs1.RecordCount > 0 Then
                rs1.Fields("户主姓名") = Text1(1).Text
                rs1.Update
            End If
            rs1.Close
            Dim rs2 As New ADODB.Recordset
            rs2.Open "select * from tab_rkinfo where 房间编号='" + Text1(0).Text + "'", cn, adOpenKeyset, adLockOptimistic
            If rs2.RecordCount > 0 Then
                rs2.Fields("姓名") = Text1(1).Text
                rs2.Fields("性别") = Text1(2).Text
                rs2.Fields("工作单位") = Text1(6).Text
                rs2.Fields("单位电话") = Text1(7).Text
                rs2.Fields("手机") = Text1(4).Text
                rs2.Update
            End If
            rs2.Close
            MsgBox "修改成功!", , "系统提示"
        Else
        End If
        adors.Close
    End With
    Frm_yzinfodj.Adodc4.Refresh
    Unload Me
End Sub
Private Sub Command2_Click()    '退出
    Unload Me
    Frm_yzinfodj.Show   '显示业主信息登记窗体
End Sub

Private Sub Form_Load()
    '自动识别路径
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tab_yzinfo"
    Adodc1.Refresh
End Sub

Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
        Select Case Index
        Case 2
            Text1(4).SetFocus
        Case 3
            Text1(7).SetFocus
        Case 4
            Text1(5).SetFocus
        Case 5
            Text1(3).SetFocus
        Case 7
            Text1(15).SetFocus
        Case 15
            Text1(12).SetFocus
        Case 12
            Text1(8).SetFocus
        Case 8
            Text1(9).SetFocus
        Case 9
            Text1(6).SetFocus
        Case 6
            Text1(10).SetFocus
        Case 10
            Text1(11).SetFocus
        Case 11
            Text1(16).SetFocus
        Case 16
            Text1(13).SetFocus
        Case 13
            Command1.SetFocus
        End Select
    End If

End Sub

⌨️ 快捷键说明

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