[AccessD] Compact & Repair (Urgent)

Paul Hartland (ISHARP) paul.hartland at isharp.co.uk
Mon Jun 27 05:23:15 CDT 2005


It's what I used to use in a timer program in Visual Basic 6.0 and used to
work fine 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Sad Der
Sent: 27 June 2005 11:01
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Compact & Repair (Urgent)

?? Is that all ??

Nice! Thnx.

Regards
SD

--- paul.hartland at fsmail.net wrote:

> This is a snippet of code I used to use, if anyone has a better way I 
> would also like to see it:
> 
> Dim MyDate As String
>     MyDate = Left(Date, 2) & "_" & Mid(Date, 4, 2) & "_" & Right(Date, 
> 2)
>     FileCopy "Database", "Database_Backup" & MyDate & ".mdb"
>     DBEngine.CompactDatabase "Database_Backup"& MyDate & ".mdb", 
> "Database_Compact"
>     Kill "Database"
>     Name "Database_Compact" As "Database"
> 
> Database = Original Database
> Database_Backup = Backup (Just in case of an OOPS)
> 
> Database_Compact = Name of database once compacted & repaired
> 
> 
> 
> Message date : Jun 27 2005, 10:43 AM
> >From : "Sad Der" 
> To : "Acces User Group" 
> Copy to : 
> Subject : [AccessD] Compact & Repair (Urgent) Hi,
> 
> I forgot my CD's from the ADHB2K. I've got the book here but I cannot 
> seem to find the code to compact and repair an access database.
> 
> Has anyone got it or knows where in the book I can find it?
> 
> Thnx!!!!!!!!
> 
> Regards,
> 
> SD
> 
> 
> 
> ____________________________________________________
> 
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
> 
> http://football.fantasysports.yahoo.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> 
> Whatever you Wanadoo:
> http://www.wanadoo.co.uk/time/
> 
> This email has been checked for most known viruses - find out more at:
> http://www.wanadoo.co.uk/help/id/7098.htm
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



		
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list