?? frm_alter.frm
字號:
VERSION 5.00
Begin VB.Form ModFixed
Caption = "修改固定資產"
ClientHeight = 5445
ClientLeft = 6975
ClientTop = 3360
ClientWidth = 6825
LinkTopic = "Form1"
ScaleHeight = 5445
ScaleWidth = 6825
Begin VB.Frame Frame2
Height = 975
Left = 0
TabIndex = 14
Top = 4440
Width = 6855
Begin VB.CommandButton Command2
Caption = "關 閉"
Default = -1 'True
Height = 495
Left = 3240
TabIndex = 16
Top = 240
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "修 改"
Height = 495
Left = 1920
TabIndex = 15
Top = 240
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "固定資產添加"
Height = 4335
Left = 0
TabIndex = 1
Top = 0
Width = 6855
Begin VB.TextBox txtBy
Appearance = 0 'Flat
Height = 270
Left = 2520
TabIndex = 7
Top = 1440
Width = 1815
End
Begin VB.TextBox txtMark
Appearance = 0 'Flat
Height = 1695
Left = 240
MaxLength = 100
TabIndex = 6
Top = 2280
Width = 6375
End
Begin VB.TextBox txtMoney
Appearance = 0 'Flat
Height = 270
Left = 240
TabIndex = 5
Top = 1440
Width = 1815
End
Begin VB.TextBox txtNum
Appearance = 0 'Flat
Height = 270
Left = 4800
TabIndex = 4
Top = 600
Width = 1815
End
Begin VB.TextBox txtName
Appearance = 0 'Flat
Height = 270
Left = 2520
TabIndex = 3
Top = 600
Width = 1815
End
Begin VB.TextBox txtID
Appearance = 0 'Flat
Height = 270
Left = 240
TabIndex = 2
Top = 600
Width = 1815
End
Begin VB.Label Label9
Caption = "經手人ID"
Height = 255
Left = 2520
TabIndex = 13
Top = 1200
Width = 1335
End
Begin VB.Label Label8
Caption = "資產說明"
Height = 255
Left = 240
TabIndex = 12
Top = 2040
Width = 2055
End
Begin VB.Label Label4
Caption = "單價(元)"
Height = 255
Left = 240
TabIndex = 11
Top = 1200
Width = 1335
End
Begin VB.Label Label3
Caption = "資產數目"
Height = 255
Left = 4800
TabIndex = 10
Top = 360
Width = 1335
End
Begin VB.Label Label2
Caption = "資產名稱"
Height = 255
Left = 2520
TabIndex = 9
Top = 360
Width = 1575
End
Begin VB.Label Label1
Caption = "資產編號"
Height = 255
Left = 240
TabIndex = 8
Top = 360
Width = 1575
End
End
Begin VB.TextBox txtDate
Appearance = 0 'Flat
Height = 270
Left = 4680
TabIndex = 0
Top = 1440
Width = 1815
End
End
Attribute VB_Name = "ModFixed"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strSql As String 'sql查詢語句
strSql = "update tb_zichan set zcName ='" & txtName.Text & " ',zcNum='" & txtNum.Text & " ',zcMoney='" & txtMoney.Text & "',zcBy='" & txtBy.Text & "',zcMark='" & txtMark.Text & "'where zcID = '" & txtID.Text & "'"
'txtMark.Text = strSql
ExecuteSql (strSql)
MsgBox "修改信息成功!", vbOKOnly
Unload Me
frm_fixList.Show
End Sub
Private Sub Command2_Click()
Me.Hide
frm_fixlistMod.Show
End Sub
Private Sub Form_Load()
Dim strSql As String 'sql查詢語句
Dim rst As New ADODB.Recordset
Dim strID As String
strSql = "select * from tb_zichan where zcID = '" & frm_fixlistMod.txtID.Text & "'"
Set rst = ExecuteSql(strSql)
If rst.EOF = True Then
MsgBox "此條記錄已經不存在,請核對后重新輸入!"
Me.Hide
frm_fixList.Show
Else
txtID.Text = rst.Fields("zcID")
txtName.Text = rst.Fields("zcName")
txtNum.Text = rst.Fields("zcNum")
txtMoney.Text = rst.Fields("zcMoney")
txtMark.Text = rst.Fields("zcMark")
txtBy.Text = rst.Fields("zcBy")
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -