?? frmmodifyliver.frm
字號(hào):
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 4240
TabIndex = 8
Top = 360
Width = 1452
End
Begin VB.CommandButton previousCommand
Caption = "上一條記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 2240
TabIndex = 7
Top = 360
Width = 1452
End
Begin VB.CommandButton firstCommand
Caption = "第一條記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 240
TabIndex = 6
Top = 360
Width = 1452
End
End
Begin VB.Frame Frame3
Caption = "修改住戶信息"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1092
Left = 120
TabIndex = 0
Top = 5280
Width = 8175
Begin VB.CommandButton deleteCommand
Caption = "刪除記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 4320
TabIndex = 4
Top = 360
Width = 1455
End
Begin VB.CommandButton cancelCommand
Caption = "關(guān)閉退出"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 6240
TabIndex = 3
Top = 360
Width = 1485
End
Begin VB.CommandButton updateCommand
Caption = "保存記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 2280
TabIndex = 2
Top = 360
Width = 1425
End
Begin VB.CommandButton editCommand
Caption = "修改記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 270
TabIndex = 1
Top = 390
Width = 1440
End
End
End
Attribute VB_Name = "frmModifyLiver"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim tempLiver As clsLiver
Private Sub cancelCommand_Click()
Unload Me
End Sub
Private Sub deleteCommand_Click()
tempLiver.DelRecord
End Sub
Private Sub editCommand_Click()
tempLiver.EditRecord
Frame2.Enabled = False
firstCommand.Enabled = False
previousCommand.Enabled = False
nextCommand.Enabled = False
lastCommand.Enabled = False
txtName.Enabled = False
txtPhone.Enabled = True
TxtAddress.Enabled = True
txtComment.Enabled = True
End Sub
Private Sub firstCommand_Click()
mrc.MoveFirst
Call viewData
End Sub
Private Sub Form_Load()
Set tempLiver = New clsLiver
tempLiver.LoadRecord
Call viewData
txtName.Enabled = False
TxtAddress.Enabled = False
txtPhone.Enabled = False
txtComment.Enabled = False
txtModifyName.Enabled = False
txtModifyDate.Enabled = False
End Sub
Public Sub viewData()
txtName.Text = tempLiver.mrc.Fields(0)
txtPhone.Text = tempLiver.mrc.Fields(1)
TxtAddress.Text = tempLiver.mrc.Fields(2)
txtComment.Text = tempLiver.mrc.Fields(3)
txtModifyName.Text = tempLiver.mrc.Fields(4)
txtModifyDate.Text = tempLiver.mrc.Fields(5)
End Sub
Private Sub lastCommand_Click()
tempLiver.mrc.MoveLast
Call viewData
End Sub
Private Sub nextCommand_Click()
tempLiver.mrc.MoveNext
If tempLiver.mrc.EOF Then
tempLiver.mrc.MoveFirst
End If
Call viewData
End Sub
Private Sub previousCommand_Click()
tempLiver.mrc.MovePrevious
If mrc.BOF Then
tempLiver.mrc.MoveLast
End If
Call viewData
End Sub
Private Sub updateCommand_Click()
Dim txtSQL As String
Dim MsgText As String
Dim mrcc As ADODB.Recordset
If tempLiver.mcclean Then
MsgBox "請(qǐng)先修改住戶資料信息信息", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Not Testtxt(txtName.Text) Then
MsgBox "請(qǐng)輸入住戶名稱!", vbOKOnly + vbExclamation, "警告"
txtName.SetFocus
Exit Sub
End If
If Not Testtxt(txtPhone.Text) Then
MsgBox "請(qǐng)輸入電話!", vbOKOnly + vbExclamation, "警告"
txtName.SetFocus
Exit Sub
End If
If Not Testtxt(TxtAddress.Text) Then
MsgBox "請(qǐng)輸入聯(lián)系地址!", vbOKOnly + vbExclamation, "警告"
txtName.SetFocus
Exit Sub
End If
tempLiver.Update txtName.Text, txtPhone.Text, TxtAddress.Text, Me.txtComment.Text
Call viewData
Frame2.Enabled = True
firstCommand.Enabled = True
previousCommand.Enabled = True
nextCommand.Enabled = True
lastCommand.Enabled = True
txtName.Enabled = False
txtPhone.Enabled = False
TxtAddress.Enabled = False
tempLiver.mcclean = True
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -