Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JJ JJ is offline
external usenet poster
 
Posts: 122
Default Automate compacting database

I used ADO to connect to an excel spreadsheet to an access database. Is
there a way to write a macro that will automatically compact the database
when the user closes the excel spreadsheet?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Automate compacting database

JJ,
There is a setting in Access that is "Compact on close".

NickHK

"JJ" wrote in message
...
I used ADO to connect to an excel spreadsheet to an access database. Is
there a way to write a macro that will automatically compact the database
when the user closes the excel spreadsheet?



  #3   Report Post  
Posted to microsoft.public.excel.programming
JJ JJ is offline
external usenet poster
 
Posts: 122
Default Automate compacting database

Thanks Nick, however I forgot to mention that the users do not open the
database. They only access an excel spreadsheet that allows them to read and
write to the database.

"NickHK" wrote:

JJ,
There is a setting in Access that is "Compact on close".

NickHK

"JJ" wrote in message
...
I used ADO to connect to an excel spreadsheet to an access database. Is
there a way to write a macro that will automatically compact the database
when the user closes the excel spreadsheet?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Automate compacting database

JJ,
If you make this setting in the database once, it will compact each and
every time the (last-user) closes the database.

If you wish to compact each time through code:
http://www.freevbcode.com/ShowCode.asp?ID=1162

NickHK

"JJ" wrote in message
...
Thanks Nick, however I forgot to mention that the users do not open the
database. They only access an excel spreadsheet that allows them to read

and
write to the database.

"NickHK" wrote:

JJ,
There is a setting in Access that is "Compact on close".

NickHK

"JJ" wrote in message
...
I used ADO to connect to an excel spreadsheet to an access database.

Is
there a way to write a macro that will automatically compact the

database
when the user closes the excel spreadsheet?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Automate compacting database


NickHK wrote:
There is a setting in Access that is "Compact on close".


Thanks Nick, however I forgot to mention that the users do not open

the
database. They only access an excel spreadsheet that allows them

to read
and write to the database.


If you make this setting in the database once, it will compact each

and
every time the (last-user) closes the database.


I think the OP is correct i.e. this is an MS Access setting which is
unavailable to them because they are not using MS Access. If it was a
setting in the database layer there would be a corresponding property
in the Jet provider, yet I cannot find such a property.

Jamie.

--



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Automate compacting database

Jamie,
Assuming he's the Admin, he could make the setting as he would access to the
DB.
If the users are do not have that permission, they would not be able to
compact anyway.

NickHK

"Jamie Collins" wrote in message
ups.com...

NickHK wrote:
There is a setting in Access that is "Compact on close".

Thanks Nick, however I forgot to mention that the users do not open

the
database. They only access an excel spreadsheet that allows them

to read
and write to the database.


If you make this setting in the database once, it will compact each

and
every time the (last-user) closes the database.


I think the OP is correct i.e. this is an MS Access setting which is
unavailable to them because they are not using MS Access. If it was a
setting in the database layer there would be a corresponding property
in the Jet provider, yet I cannot find such a property.

Jamie.

--



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compacting spreadsheets teach1 Excel Discussion (Misc queries) 5 March 26th 08 02:17 PM
Compacting a file Kayakgirl Excel Discussion (Misc queries) 3 November 20th 06 10:43 PM
automate entries into document from a excel database Designer Lady New Users to Excel 3 March 23rd 06 09:43 PM
how to automate invoice using excel database Kathy Powercraft Excel Discussion (Misc queries) 1 October 6th 05 02:29 PM
Compacting Excel-VBA file Oliver Kharraz Excel Programming 1 November 29th 03 05:53 PM


All times are GMT +1. The time now is 05:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"