D
Dwayne Conyers
I have code to compact the database. I need to add lines to report the size
to the user before and after compacting. Would appreciate any tips on
capturing the file size to a variable.
Thanks.
<!-- CODE APPEARS BELOW //-->
Private Sub cmdCompact_Click()
On Error GoTo Err_cmdCompact_Click
sizenow = CurrentProject
MsgBox sizenow
Dim currpath As String
currpath = CurrentProject.Path
ourmdb = CurrentProject.FullName
ourmde = currpath + "\lessons_learned.mde"
Dim accApp As Access.Application
Set accApp = New Access.Application
accApp.SysCmd 603, ourmdb, ourmde
accApp.SysCmd 602, ourmdb, ourmdb
Set accApp = Nothing
MsgBox "The database has been successfully compacted.", vbInformation +
vbOKOnly, "Operation Complete"
Exit_cmdCompact_Click:
Exit Sub
Err_cmdCompact_Click:
fooBAR
End Sub
to the user before and after compacting. Would appreciate any tips on
capturing the file size to a variable.
Thanks.
<!-- CODE APPEARS BELOW //-->
Private Sub cmdCompact_Click()
On Error GoTo Err_cmdCompact_Click
sizenow = CurrentProject
MsgBox sizenow
Dim currpath As String
currpath = CurrentProject.Path
ourmdb = CurrentProject.FullName
ourmde = currpath + "\lessons_learned.mde"
Dim accApp As Access.Application
Set accApp = New Access.Application
accApp.SysCmd 603, ourmdb, ourmde
accApp.SysCmd 602, ourmdb, ourmdb
Set accApp = Nothing
MsgBox "The database has been successfully compacted.", vbInformation +
vbOKOnly, "Operation Complete"
Exit_cmdCompact_Click:
Exit Sub
Err_cmdCompact_Click:
fooBAR
End Sub