Re: compacting database
- From: "Arvin Meyer [MVP]" <arvinm@xxxxxxxxxxxx>
- Date: Sun, 19 Oct 2008 08:46:06 -0400
There is the MoveFile Method.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"Jason" <JAllen@xxxxxxxxxxx> wrote in message
news:OrVCuEbMJHA.5780@xxxxxxxxxxxxxxxxxxxxxxx
are you sure it is name as this is usually Form.name:
did f1 on name and found that it is supposed to be as instead of comma/
Is there facility to move also?
Thanks,
Arvin Meyer [MVP]" <arvinm@xxxxxxxxxxxx> wrote in message
news:OyF8vwaMJHA.740@xxxxxxxxxxxxxxxxxxxxxxx
The Kill statement will delete the old file.
Kill "F:\yourdir\oldname.mdb",
The Name statement will rename a file:
Name "F:\yourdir\newname.mdb", "F:\yourdir\oldname.mdb"
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"Jason" <JAllen@xxxxxxxxxxx> wrote in message
news:OZGOH6YMJHA.6000@xxxxxxxxxxxxxxxxxxxxxxx
How do I delete the existing mdb file and rename the compacted file
within access?
Thanks,
J.
"Arvin Meyer [MVP]" <arvinm@xxxxxxxxxxxx> wrote in message
news:eCZD8TNMJHA.5780@xxxxxxxxxxxxxxxxxxxxxxx
"Jason" <JAllen@xxxxxxxxxxx> wrote in message
news:OjMX2oMMJHA.1736@xxxxxxxxxxxxxxxxxxxxxxx
Someone posted about compacting a backend file from within the front
end. I have had at least a 99% failure rate doing it this way.
However, using Tools - compact works but is a manual task.
Have you tried:
DBEngine.CompactDatabase "F:\yourdir\oldname.mdb",
"F:\yourdir\newname.mdb",
or to the same name:
DBEngine.CompactDatabase "F:\yourdir\oldname.mdb",
"F:\yourdir\oldname.mdb"
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
.
- Follow-Ups:
- Re: compacting database
- From: Jason
- Re: compacting database
- From: JohnC
- Re: compacting database
- References:
- compacting database
- From: Jason
- Re: compacting database
- From: Arvin Meyer [MVP]
- Re: compacting database
- From: Jason
- Re: compacting database
- From: Arvin Meyer [MVP]
- Re: compacting database
- From: Jason
- compacting database
- Prev by Date: Re: recordset.clone
- Next by Date: Re: compacting database
- Previous by thread: Re: compacting database
- Next by thread: Re: compacting database
- Index(es):