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

📄 frm_dlinfosc.frm

📁 一个详细的VB做的小区物业管理系统
💻 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    =   3120
   ClientLeft      =   2940
   ClientTop       =   2745
   ClientWidth     =   5925
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3120
   ScaleWidth      =   5925
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   405
      Left            =   1350
      Top             =   3510
      Width           =   1620
      _ExtentX        =   2858
      _ExtentY        =   714
      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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from tab_xqinfo"
      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            =   3375
      TabIndex        =   18
      Top             =   210
      Width           =   2385
      Begin VB.CommandButton Command2 
         Caption         =   "返回主系统"
         Height          =   375
         Left            =   1095
         TabIndex        =   20
         Top             =   210
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "开始生成"
         Height          =   375
         Left            =   150
         TabIndex        =   19
         Top             =   210
         Width           =   960
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "选择小区"
      Height          =   720
      Left            =   180
      TabIndex        =   15
      Top             =   210
      Width           =   2535
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1155
         Style           =   2  'Dropdown List
         TabIndex        =   16
         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            =   120
      TabIndex        =   0
      Top             =   1170
      Width           =   5655
      Begin VB.TextBox Text6 
         Height          =   300
         Left            =   1065
         TabIndex        =   14
         Top             =   1260
         Width           =   4395
      End
      Begin VB.TextBox Text5 
         Height          =   300
         Left            =   4215
         TabIndex        =   13
         Top             =   750
         Width           =   1230
      End
      Begin VB.TextBox Text4 
         Height          =   300
         Left            =   1035
         TabIndex        =   11
         Top             =   780
         Width           =   2115
      End
      Begin VB.TextBox Text3 
         Height          =   300
         Left            =   4215
         TabIndex        =   10
         Top             =   285
         Width           =   1230
      End
      Begin MSComCtl2.UpDown UpDown2 
         Height          =   300
         Left            =   2940
         TabIndex        =   8
         Top             =   330
         Width           =   270
         _ExtentX        =   476
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   -1  'True
      End
      Begin VB.TextBox Text2 
         Height          =   300
         Left            =   2310
         TabIndex        =   7
         Top             =   330
         Width           =   900
      End
      Begin MSComCtl2.UpDown UpDown1 
         Height          =   300
         Left            =   1665
         TabIndex        =   5
         Top             =   330
         Width           =   270
         _ExtentX        =   476
         _ExtentY        =   529
         _Version        =   393216
         Enabled         =   -1  'True
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   1035
         TabIndex        =   4
         Top             =   330
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "负责人:"
         Height          =   180
         Left            =   3285
         TabIndex        =   12
         Top             =   855
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "大楼名称:"
         Height          =   180
         Left            =   3255
         TabIndex        =   9
         Top             =   375
         Width           =   900
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "至"
         Height          =   180
         Left            =   2010
         TabIndex        =   6
         Top             =   375
         Width           =   180
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "大楼位置:"
         Height          =   180
         Left            =   165
         TabIndex        =   3
         Top             =   1305
         Width           =   900
      End
      Begin VB.Label Label3 
         Caption         =   "大楼说明:"
         Height          =   375
         Left            =   150
         TabIndex        =   2
         Top             =   870
         Width           =   1005
      End
      Begin VB.Label Label2 
         Caption         =   "大楼编号:"
         Height          =   435
         Left            =   165
         TabIndex        =   1
         Top             =   390
         Width           =   1065
      End
   End
   Begin VB.Label Label8 
      Caption         =   "Label8"
      DataField       =   "小区名称"
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   3540
      TabIndex        =   21
      Top             =   3510
      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 "你添的信息不完整,请将信息补充完整", 48, "提示"
Exit Sub
End If
Dim a, b As Integer
Dim l As String
b = Val(Text2.Text)
For a = Val(Text1.Text) To b
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
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 & "')")
End If
l:
Next a
MsgBox "数据保存成功", 32, "管理信息系统"
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.RecordSource = "select * from tab_xqinfo"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
Combo1.AddItem Label8.Caption
Adodc1.Recordset.MoveNext
Loop
cn.Close
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 + -