home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
browse_1
/
repair.frm
< prev
next >
Wrap
Text File
|
1993-07-19
|
982b
|
41 lines
VERSION 2.00
Begin Form frmRepair
BorderStyle = 3 'Fixed Double
Caption = "Click form to reapair / compact DEMO.MDB"
ClientHeight = 336
ClientLeft = 876
ClientTop = 1296
ClientWidth = 5292
Height = 672
Left = 828
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 336
ScaleWidth = 5292
Top = 1008
Width = 5388
End
Option Explicit
Sub Form_Click ()
Dim nF As Integer, cD As String, cDB As String
cD = App.Path + "\" + "DEMO.MDB"
cDB = App.Path + "\" + "DEMO_BAK.MDB"
On Error GoTo Abort_Repair
RepairDatabase cD
Name cD As cDB
CompactDatabase cDB, cD
Kill cDB
MsgBox "DONE!"
GoTo sub_exit
Abort_Repair:
MsgBox "Could not repair file, error: " & Error
Resume sub_exit
sub_exit:
Unload Me
End Sub