📄 frm_fwinfomd.frm
字号:
Left = 240
TabIndex = 25
Top = 960
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "大楼名称:"
Height = 165
Left = 240
TabIndex = 24
Top = 1380
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "朝 向:"
Height = 180
Left = 240
TabIndex = 23
Top = 1845
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "房屋状态:"
Height = 180
Left = 240
TabIndex = 22
Top = 2235
Width = 900
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "备 注:"
Height = 180
Left = 240
TabIndex = 21
Top = 3105
Width = 900
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "单 元:"
Height = 180
Left = 2400
TabIndex = 20
Top = 585
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "权属类型:"
Height = 180
Left = 2400
TabIndex = 19
Top = 975
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "房间结构:"
Height = 180
Left = 2400
TabIndex = 18
Top = 1395
Width = 900
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "配备设备:"
Height = 180
Left = 2400
TabIndex = 17
Top = 1830
Width = 900
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "房间类别:"
Height = 180
Left = 2400
TabIndex = 16
Top = 2265
Width = 900
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "用 途:"
Height = 180
Left = 255
TabIndex = 15
Top = 2670
Width = 900
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "楼 层:"
Height = 180
Left = 4590
TabIndex = 14
Top = 555
Width = 900
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "建筑面积:"
Height = 180
Left = 4590
TabIndex = 13
Top = 1005
Width = 900
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "使用面积:"
Height = 180
Left = 4590
TabIndex = 12
Top = 1425
Width = 900
End
Begin VB.Label Label17
AutoSize = -1 'True
Caption = "公产面积:"
Height = 180
Left = 4590
TabIndex = 11
Top = 1845
Width = 900
End
Begin VB.Label Label18
AutoSize = -1 'True
Caption = "私产面积:"
Height = 180
Left = 4590
TabIndex = 10
Top = 2295
Width = 900
End
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "户主姓名:"
Height = 180
Left = 120
TabIndex = 38
Top = 4845
Width = 900
End
End
Attribute VB_Name = "frm_fwinfomd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click() '更新
Adodc1.RecordSource = "select * from tab_fwinfo where 房间编号='" + Text1.Text + "'"
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.Fields("房间编号") = Text1.Text
Adodc1.Recordset.Fields("单元") = Text2.Text
Adodc1.Recordset.Fields("楼层") = Text3.Text
' Adodc1.Recordset.Fields("户主姓名") = Text4.Text
Adodc1.Recordset.Fields("用途") = Text5.Text
Adodc1.Recordset.Fields("建筑面积") = Text6.Text
Adodc1.Recordset.Fields("使用面积") = Text7.Text
Adodc1.Recordset.Fields("公产面积") = Text8.Text
Adodc1.Recordset.Fields("私产面积") = Text9.Text
Adodc1.Recordset.Fields("备注") = Text10.Text
Adodc1.Recordset.Fields("小区名称") = Text11.Text
Adodc1.Recordset.Fields("大楼名称") = Text12.Text
Adodc1.Recordset.Fields("朝向") = Text13.Text
Adodc1.Recordset.Fields("房屋状态") = Text14.Text
Adodc1.Recordset.Fields("权属类型") = Text15.Text
Adodc1.Recordset.Fields("房间结构") = Text16.Text
Adodc1.Recordset.Fields("配备设施") = Text17.Text
Adodc1.Recordset.Fields("房间类别") = Text18.Text
MsgBox "数据修改成功!", , "系统提示"
On Error Resume Next
Adodc1.Recordset.Update
Adodc1.Refresh
' Dim rs1 As New ADODB.Recordset
' rs1.Open "select * from tab_yzinfo where 业主代号='" + Text1.Text + "'", cn, adOpenKeyset, adLockOptimistic
' If rs1.RecordCount > 0 Then
' rs1.Fields("业主姓名") = Text4.Text
' rs1.Update
' End If
Unload Me
End If
End Sub
Private Sub Command2_Click() '返回
Unload Me
frm_fwinfo.Show
frm_fwinfo.Adodc1.Refresh
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_fwinfo"
Adodc1.Refresh
Adodc1.RecordSource = "select * from tab_fwinfo where 房间编号='" + MyStr + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
On Error Resume Next
Text1.Text = Adodc1.Recordset.Fields("房间编号")
Text2.Text = Adodc1.Recordset.Fields("单元")
Text3.Text = Adodc1.Recordset.Fields("楼层")
' Text4.Text = Adodc1.Recordset.Fields("户主姓名")
Text5.Text = Adodc1.Recordset.Fields("用途")
Text6.Text = Adodc1.Recordset.Fields("建筑面积")
Text7.Text = Adodc1.Recordset.Fields("使用面积")
Text8.Text = Adodc1.Recordset.Fields("公产面积")
Text9.Text = Adodc1.Recordset.Fields("私产面积")
Text10.Text = Adodc1.Recordset.Fields("备注")
Text11.Text = Adodc1.Recordset.Fields("小区名称")
Text12.Text = Adodc1.Recordset.Fields("大楼名称")
Text13.Text = Adodc1.Recordset.Fields("朝向")
Text14.Text = Adodc1.Recordset.Fields("房屋状态")
Text15.Text = Adodc1.Recordset.Fields("权属类型")
Text16.Text = Adodc1.Recordset.Fields("房间结构")
Text17.Text = Adodc1.Recordset.Fields("配备设施")
Text18.Text = Adodc1.Recordset.Fields("房间类别")
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -