Sub CompactRepairDB() Dim strFilePath As String strFilePath = CurrentProject.Path If Len(Dir(strFilePath & "\Small.mdb")) Then Kill strFilePath & "\Small.mdb" End IfEnd Sub