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

📄 frm_dlinfosc.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Frm_dlinfosc 
   Caption         =   "大楼信息生成"
   ClientHeight    =   2715
   ClientLeft      =   2940
   ClientTop       =   2745
   ClientWidth     =   5775
   Icon            =   "Frm_dlinfosc.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2715
   ScaleWidth      =   5775
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   405
      Left            =   3000
      Top             =   2865
      Width           =   2250
      _ExtentX        =   3969
      _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 Frame3 
      Height          =   735
      Left            =   3135
      TabIndex        =   18
      Top             =   90
      Width           =   2565
      Begin VB.CommandButton Command2 
         Caption         =   "返回主系统"
         Height          =   375
         Left            =   1275
         TabIndex        =   20
         Top             =   210
         Width           =   1200
      End
      Begin VB.CommandButton Command1 
         Caption         =   "开始生成"
         Height          =   375
         Left            =   75
         TabIndex        =   19
         Top             =   210
         Width           =   1200
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "选择小区"
      Height          =   720
      Left            =   75
      TabIndex        =   16
      Top             =   90
      Width           =   2535
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1155
         Style           =   2  'Dropdown List
         TabIndex        =   0
         Top             =   270
         Width           =   1200
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "小区名称:"
         Height          =   180
         Left            =   240
         TabIndex        =   17
         Top             =   300
         Width           =   900
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "基础信息"
      Height          =   1815
      Left            =   60
      TabIndex        =   1
      Top             =   855
      Width           =   5655
      Begin VB.TextBox Text6 
         Height          =   300
         Left            =   1065
         TabIndex        =   15
         Top             =   1260
         Width           =   4395
      End
      Begin VB.TextBox Text5 
         Height          =   300
         Left            =   4215
         TabIndex        =   14
         Top             =   750
         Width           =   1230
      End
      Begin VB.TextBox Text4 
         Height          =   300
         Left            =   1065
         TabIndex        =   12
         Top             =   780
         Width           =   2115
      End
      Begin VB.TextBox Text3 
         Height          =   300
         Left            =   4230
         TabIndex        =   11
         Top             =   285
         Width           =   1230
      End
      Begin MSComCtl2.UpDown UpDown2 
         Height          =   300
         Left            =   2955
         TabIndex        =   9
         Top             =   330
         Width           =   270
         _ExtentX        =   476
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   -1  'True
      End
      Begin VB.TextBox Text2 
         Height          =   300
         Left            =   2310
         TabIndex        =   8
         Top             =   330
         Width           =   900
      End
      Begin MSComCtl2.UpDown UpDown1 
         Height          =   300
         Left            =   1695
         TabIndex        =   6
         Top             =   330
         Width           =   270
         _ExtentX        =   476
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   -1  'True
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   1065
         TabIndex        =   5
         Top             =   330
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "负责人:"
         Height          =   180
         Left            =   3450
         TabIndex        =   13
         Top             =   855
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "大楼名称:"
         Height          =   180
         Left            =   3270
         TabIndex        =   10
         Top             =   375
         Width           =   900
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "至"
         Height          =   180
         Left            =   2010
         TabIndex        =   7
         Top             =   375
         Width           =   180
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "大楼位置:"
         Height          =   435
         Left            =   165
         TabIndex        =   4
         Top             =   1305
         Width           =   1065
      End
      Begin VB.Label Label3 
         Caption         =   "大楼说明:"
         Height          =   435
         Left            =   165
         TabIndex        =   3
         Top             =   870
         Width           =   1065
      End
      Begin VB.Label Label2 
         Caption         =   "大楼编号:"
         Height          =   435
         Left            =   165
         TabIndex        =   2
         Top             =   390
         Width           =   1065
      End
   End
   Begin VB.Label Label8 
      Caption         =   "Label8"
      DataField       =   "小区名称"
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   1110
      TabIndex        =   21
      Top             =   2850
      Width           =   1425
   End
End
Attribute VB_Name = "Frm_dlinfosc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()   '开始生成
    If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Combo1.Text = "" Then
        MsgBox "你输入的信息不完整,请将信息补充完整!", , "系统提示"
        Exit Sub
    End If
    Dim a, b As Integer
    Dim L As String
    b = Val(Text2.Text)
    For a = Val(Text1.Text) To b
        'Val 函数返回包含于字符串内的数字,字符串中是一个适当类型的数值。
        frm_dlinfomd.Adodc1.RecordSource = "select * from tab_dlinfo  "
        frm_dlinfomd.Adodc1.Refresh
        If frm_dlinfomd.Adodc1.Recordset.RecordCount > 0 Then
            frm_dlinfomd.Adodc1.Recordset.MoveFirst
            Do While frm_dlinfomd.Adodc1.Recordset.EOF = False
                If frm_dlinfomd.Adodc1.Recordset.Fields("大楼名称") = Trim(Text3 + Trim(Str(a))) Then
                    'Trim 函数返回 Variant (String),其中包含指定字符串的拷贝,没有前导和尾随空白。
                    GoTo L:
                Else
                    frm_dlinfomd.Adodc1.Recordset.MoveNext
                End If
            Loop
            Set adors = cn.Execute("insert into tab_dlinfo (大楼编号,大楼名称,负责人,大楼说明,大楼位置) values( '" & Trim(Combo1 + Trim(Str(a))) & "' , '" & Trim(Text3.Text + Trim(Str(a))) & "','" & Text5 & "','" & Text4 & "','" & Text6 & "')")
        Else
            Set adors = cn.Execute("insert into tab_dlinfo (大楼编号,大楼名称,负责人,大楼说明,大楼位置) values('" & Trim(Combo1 + Trim(Str(a))) & "' ,'" & Trim(Text3.Text + Trim(Str(a))) & "','" & Text5 & "','" & Text4 & "','" & Text6 & "')")
            'Str 函数返回代表一数值的 Variant (String)。
        End If
L:
    Next a
    MsgBox "数据保存成功!", , "系统提示"
    Unload Me
    frm_dlinfomd.Adodc1.Refresh
    cn.Close
End Sub
Private Sub Command2_Click()   '返回主系统
    Frm_main.Show
    Unload Me
    Me.Hide
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_xqinfo"
    Adodc1.Refresh
    
'    If Adodc1.Recordset.RecordCount > 0 Then
'        Combo1.AddItem Label8.Caption
'        Adodc1.Recordset.MoveNext
'        If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
'    End If

        Adodc1.Recordset.MoveFirst
        Do While Adodc1.Recordset.EOF = False
            Combo1.AddItem Label8.Caption
            Adodc1.Recordset.MoveNext
        Loop
    cn.Close
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then Text2.SetFocus    '按回车键Text2获得焦点
End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Text3.SetFocus
End Sub

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Text4.SetFocus
End Sub

Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Text5.SetFocus
End Sub

Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Text6.SetFocus
End Sub

Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Command1.SetFocus
End Sub

Private Sub UpDown1_Change()
    Text1.Text = UpDown1.Value
End Sub
Private Sub UpDown2_Change()
    Text2.Text = UpDown2.Value
End Sub

⌨️ 快捷键说明

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