📄 form4.frm
字号:
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 4560
TabIndex = 2
Top = 1200
Width = 1575
End
Begin VB.Label Label6
AutoSize = -1 'True
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 480
Left = 7200
TabIndex = 21
Top = 720
Width = 180
End
Begin VB.Label Label7
Caption = "星期"
Height = 255
Left = 6600
TabIndex = 20
Top = 840
Width = 495
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "公寓号"
Height = 180
Left = 720
TabIndex = 9
Top = 480
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "寝室号"
Height = 180
Left = 3840
TabIndex = 8
Top = 480
Width = 540
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "检查日期"
Height = 180
Left = 600
TabIndex = 7
Top = 1200
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "卫生状况"
Height = 180
Left = 3720
TabIndex = 6
Top = 1320
Width = 720
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 5280
Top = 2040
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
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.3.51;Persist Security Info=False;Data Source=D:\xrh\disk1\DOWNLOAD\vb\程序代码\公寓管理\Mydb.mdb"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=D:\xrh\disk1\DOWNLOAD\vb\程序代码\公寓管理\Mydb.mdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "cleaner"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
BeginProperty Font
Name = "宋体"
Size = 24
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 495
Left = 4785
TabIndex = 0
Top = 0
Width = 285
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
On Error GoTo adderr
Text1.SetFocus
Adodc1.Recordset.AddNew
Exit Sub
adderr:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
On Error GoTo deleteerr
With Adodc1.Recordset
If Not .EOF And Not .BOF Then
If MsgBox("删除当前记录吗?", vbYesNo + vbQuestion) = vbYes Then
.Delete
.MoveNext
If .EOF Then .MoveLast
End If
End If
End With
Exit Sub
deleteerr:
MsgBox Err.Description
End Sub
Private Sub Command3_Click()
On Error GoTo updateerr
Adodc1.Recordset.UpdateBatch
Exit Sub
updateerr:
MsgBox Err.Description
End Sub
Private Sub Command4_Click()
On Error GoTo cancelupdateerr
Adodc1.Recordset.CancelBatch
Exit Sub
cancelupdateerr:
MsgBox Err.Description
End Sub
Private Sub Command5_Click()
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "记录空", vbOKCancel + vbQuestion
End
Else
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
MsgBox "这是第一条记录", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command7_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
MsgBox "这是最后一条记录", vbOKCancel + vbQuestion
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command8_Click()
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "空记录", vbOKCancel + vbQuestion
End
Else
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command9_Click()
caidan.Show
Form4.Hide
End Sub
Private Sub Form_Load()
Label6.Caption = Weekday(Date$) - 1
Text3.Text = Date
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -