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

📄 form5.frm

📁 土地管理系统 用acess+datareporter做的
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         AutoSize        =   -1  'True
         Caption         =   "村"
         Height          =   195
         Left            =   6360
         TabIndex        =   33
         Top             =   2640
         Width           =   180
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "镇"
         Height          =   195
         Left            =   3360
         TabIndex        =   32
         Top             =   2640
         Width           =   180
      End
      Begin VB.Label Label11 
         Caption         =   "土地所有者"
         Height          =   255
         Left            =   240
         TabIndex        =   29
         Top             =   2640
         Width           =   1095
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "中止日期"
         Height          =   195
         Left            =   6360
         TabIndex        =   27
         Top             =   2160
         Width           =   720
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "使用期限"
         Height          =   195
         Left            =   360
         TabIndex        =   25
         Top             =   2160
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "使用权类型"
         Height          =   195
         Left            =   6240
         TabIndex        =   23
         Top             =   1680
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "权属性质"
         Height          =   195
         Left            =   480
         TabIndex        =   21
         Top             =   1680
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "土地座落"
         Height          =   195
         Left            =   480
         TabIndex        =   18
         Top             =   1200
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "主管部门"
         Height          =   195
         Left            =   7680
         TabIndex        =   17
         Top             =   840
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "单位性质"
         Height          =   195
         Left            =   4440
         TabIndex        =   15
         Top             =   840
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "法人代表姓名"
         Height          =   195
         Left            =   120
         TabIndex        =   13
         Top             =   720
         Width           =   1080
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   " 土地使用者"
         Height          =   195
         Left            =   240
         TabIndex        =   11
         Top             =   360
         Width           =   945
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "查询"
      Height          =   855
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   11415
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   2040
         TabIndex        =   8
         Top             =   360
         Width           =   1695
      End
      Begin VB.ComboBox Combo1 
         Appearance      =   0  'Flat
         Height          =   315
         Left            =   240
         TabIndex        =   7
         Text            =   "Combo1"
         Top             =   360
         Width           =   1575
      End
      Begin VB.CommandButton Command6 
         Caption         =   "修改"
         Enabled         =   0   'False
         Height          =   375
         Left            =   7080
         TabIndex        =   6
         Top             =   360
         Width           =   975
      End
      Begin VB.CommandButton Command3 
         Caption         =   "关闭"
         Height          =   375
         Left            =   10320
         TabIndex        =   5
         Top             =   360
         Width           =   975
      End
      Begin VB.CommandButton Command5 
         Caption         =   "下一条"
         Enabled         =   0   'False
         Height          =   375
         Left            =   6000
         TabIndex        =   4
         Top             =   360
         Width           =   975
      End
      Begin VB.CommandButton Command4 
         Caption         =   "打印预览"
         Enabled         =   0   'False
         Height          =   375
         Left            =   8160
         TabIndex        =   3
         Top             =   360
         Width           =   975
      End
      Begin VB.CommandButton Command2 
         Caption         =   "上一条"
         Enabled         =   0   'False
         Height          =   375
         Left            =   4920
         TabIndex        =   2
         Top             =   360
         Width           =   975
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Height          =   375
         Left            =   3840
         TabIndex        =   1
         Top             =   360
         Width           =   975
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "="
         Height          =   195
         Left            =   1920
         TabIndex        =   9
         Top             =   360
         Width           =   90
      End
   End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cnn As ADODB.Connection
Dim cmd As ADODB.Command
Public rsstringtemp2 As String
Dim rs3 As ADODB.Recordset
Dim aa As Boolean
Private Sub Command1_Click()
On Error Resume Next
Set cnn = New ADODB.Connection
 Set rs3 = New ADODB.Recordset
 rs3.CursorLocation = adUseClient
 rs3.CursorType = adOpenDynamic
 rs3.LockType = adLockPessimistic
 cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\tdgl.mdb;Persist Security Info=False"
 Dim combo As String
 
 Select Case Combo1.Text
     Case "土地使用者"
          combo = "SoilUser"
     Case "图号"
          combo = "ChartNum"
     Case "地号"
          combo = "SoilNum"
     Case "土地证号"
          combo = "SoilCardNum"
 End Select
 If Text1.Text = "" Then
     MsgBox "请输入查询条件"
     Exit Sub
 End If
 
  Dim rsstring3 As String
 rsstring3 = "select * from tddjsq where " & combo & "='" & Text1.Text & "'"
 rsstringtemp2 = rsstring3
 rs3.Open rsstring3, cnn
 aa = True
  If rs3.RecordCount = 0 Then
    MsgBox "没有找到数据"
 Else
   Text15.Text = rs3!SoilUser
   Text2.Text = rs3!CorporName
   Text4.Text = rs3!CorporUnitprop
   Text5.Text = rs3!CorporUnit
   Text6.Text = rs3!SoilPos
   
   Text7.Text = rs3!QSXZ
   Text8.Text = rs3!SYQLX
   Text3.Text = rs3!SYQX
  
   Text9.Text = rs3!SoilownerZhen
   Text12.Text = rs3!SoilownerCun
   Text13.Text = rs3!SoilownerZu
   Text14.Text = rs3!SYQMJ
   Text16.Text = rs3!DYMJ
   Text17.Text = rs3!DYTDYT
   Text22.Text = rs3!GYFTMJ
   Text18.Text = rs3!DYJZMJ
   Text19.Text = rs3!DYJZLX
   Text20.Text = rs3!GYZDMJ
   Text21.Text = rs3!GYQS
   
   Text24.Text = rs3!GYR
   Text23.Text = rs3!GYDJ
   Text25.Text = rs3!ZDSZ
   Text26.Text = rs3!SQDHYJ
   If rs3!BZ <> Null Then
   Text27.Text = rs3!BZ
     
   Else
       Text27.Text = ""
   End If
   
   
 End If
 If rs3.RecordCount > 1 Then
    Command5.Enabled = True
 End If
 Command4.Enabled = True
 Command6.Enabled = True
 Command7.Enabled = True
End Sub

Private Sub Command2_Click()
On Error Resume Next
  If rs3.RecordCount > 1 Then
        rs3.MovePrevious
        If Not rs3.BOF Then
            Text15.Text = rs3!SoilUser
            Text2.Text = rs3!CorporName
            Text4.Text = rs3!CorporUnitprop
            Text5.Text = rs3!CorporUnit
            Text6.Text = rs3!SoilPos
   
            Text7.Text = rs3!QSXZ
            Text8.Text = rs3!SYQLX
            Text3.Text = rs3!SYQX
  
            Text9.Text = rs3!SoilownerZhen
            Text12.Text = rs3!SoilownerCun
            Text13.Text = rs3!SoilownerZu
            Text14.Text = rs3!SYQMJ
            Text16.Text = rs3!DYMJ
            Text17.Text = rs3!DYTDYT
            Text22.Text = rs3!GYFTMJ
            Text18.Text = rs3!DYJZMJ
            Text19.Text = rs3!DYJZLX
            Text20.Text = rs3!GYZDMJ
            Text21.Text = rs3!GYQS
   
            Text24.Text = rs3!GYR
            Text23.Text = rs3!GYDJ
            Text25.Text = rs3!ZDSZ
            Text26.Text = rs3!SQDHYJ
            Text27.Text = rs3!BZ
            If rs3!BZ <> Null Then
                Text27.Text = rs3!BZ
            Else
                Text27.Text = ""
            End If
        Else
            MsgBox "已经是第一条记录"
            Command2.Enabled = False
        End If
     Command5.Enabled = True
   
    
    End If
End Sub

Private Sub Command3_Click()
On Error Resume Next
   Text15.Text = ""
   Text2.Text = ""
   Text4.Text = ""
   Text5.Text = ""
   Text6.Text = ""
   
   Text7.Text = ""
   Text8.Text = ""
   Text3.Text = ""
  
   Text9.Text = ""
   Text12.Text = ""
   Text13.Text = ""
   Text14.Text = ""
   Text16.Text = ""
   Text17.Text = ""
   Text22.Text = ""
   Text18.Text = ""
   Text19.Text = ""
   Text20.Text = ""
   Text21.Text = ""
   
   Text24.Text = ""
   Text23.Text = ""
   Text25.Text = ""
   Text26.Text = ""
   Text27.Text = ""
If aa = True Then
rs3.Close
cnn.Close
End If
Form5.Hide
Form1.Show
End Sub

Private Sub Command4_Click()
On Error Resume Next
DataReport3.Show
End Sub

Private Sub Command5_Click()
On Error Resume Next
  If rs3.RecordCount > 1 Then
        rs3.MoveNext
        If Not rs3.EOF Then
            Text15.Text = rs3!SoilUser
   Text2.Text = rs3!CorporName
   Text4.Text = rs3!CorporUnitprop
   Text5.Text = rs3!CorporUnit
   Text6.Text = rs3!SoilPos
   
   Text7.Text = rs3!QSXZ
   Text8.Text = rs3!SYQLX
   Text3.Text = rs3!SYQX
  
   Text9.Text = rs3!SoilownerZhen
   Text12.Text = rs3!SoilownerCun
   Text13.Text = rs3!SoilownerZu
   Text14.Text = rs3!SYQMJ
   Text16.Text = rs3!DYMJ
   Text17.Text = rs3!DYTDYT
   Text22.Text = rs3!GYFTMJ
   Text18.Text = rs3!DYJZMJ
   Text19.Text = rs3!DYJZLX
   Text20.Text = rs3!GYZDMJ
   Text21.Text = rs3!GYQS
   
   Text24.Text = rs3!GYR
   Text23.Text = rs3!GYDJ
   Text25.Text = rs3!ZDSZ
   Text26.Text = rs3!SQDHYJ
        If rs3!BZ <> Null Then
                Text27.Text = rs3!BZ
            Else
                Text27.Text = ""
            End If
        Else
            MsgBox "已经是最后一条记录"
            Command5.Enabled = False
        End If
    
    Command2.Enabled = True
    
    End If
End Sub

Private Sub Command6_Click()
On Error Resume Next
  rs3!SoilUser = Text15.Text
    rs3!CorporName = Text2.Text
    rs3!CorporUnitprop = Text4.Text
    rs3!CorporUnit = Text5.Text
    rs3!SoilPos = Text6.Text
   
    rs3!QSXZ = Text7.Text
    rs3!SYQLX = Text8.Text
    rs3!SYQX = Text3.Text
  
    rs3!SoilownerZhen = Text9.Text
    rs3!SoilownerCun = Text12.Text
   rs3!SoilownerZu = Text13.Text
    rs3!SYQMJ = Text14.Text
    rs3!DYMJ = Text16.Text
    rs3!DYTDYT = Text17.Text
    rs3!GYFTMJ = Text22.Text
    rs3!DYJZMJ = Text18.Text
    rs3!DYJZLX = Text19.Text
    rs3!GYZDMJ = Text20.Text
    rs3!GYQS = Text21.Text
   
    rs3!GYR = Text24.Text
    rs3!GYDJ = Text23.Text
   rs3!ZDSZ = Text25.Text
    rs3!SQDHYJ = Text26.Text
   rs3!BZ = Text27.Text
rs3.Update
End Sub

Private Sub Command7_Click()
'Printer.PaperSize = vbPRPSA4 '定义纸张大小为A4
'Printer.Orientation = vbPRORPortrait '纵向打印
'Printer.Orientation = vbPRORLandscape '横向打印

DataReport6.PrintReport True, 1, 1, 1
'DataReport6.Show
End Sub

Private Sub Form_Load()
On Error Resume Next
   Combo1.AddItem "土地使用者"
aa = False
   Combo1.Text = Combo1.List(0)
   
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
   Text15.Text = ""
   Text2.Text = ""
   Text4.Text = ""
   Text5.Text = ""
   Text6.Text = ""
   
   Text7.Text = ""
   Text8.Text = ""
   Text3.Text = ""
  
   Text9.Text = ""
   Text12.Text = ""
   Text13.Text = ""
   Text14.Text = ""
   Text16.Text = ""
   Text17.Text = ""
   Text22.Text = ""
   Text18.Text = ""
   Text19.Text = ""
   Text20.Text = ""
   Text21.Text = ""
   
   Text24.Text = ""
   Text23.Text = ""
   Text25.Text = ""
   Text26.Text = ""
   Text27.Text = ""
If aa = True Then
rs3.Close
cnn.Close
End If
Form5.Hide
Form1.Show
End Sub

⌨️ 快捷键说明

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