Compacting and Repairing Database, Opening Primavera

G

Guest

I have a couple questions.

First of all, because I'm going to be releasing my Access database
application as an mde that cannot be altered, I'm wondering if there is any
way to allow Access to automatically compact and repair the database
periodically, such as whenever the user exits the application. I've tried
running DoCmd.RunCommand (acCmdCompactDatabase) and
DoCmd.RunCommand(acCmdRepairDatabase), but then an error message tells me
that these commands can only be run from the menu in Access. Is there any
way around this?

Secondly, some of my functions open Primavera P3. At the moment, these
functions simply say to run the executable at the default P3 path
("C:\P3WIN\P3PROGS\P3.EXE") The trouble is...what if they saved Primavera
somewhere else?

Is there any way to programmatically check for the location of a
non-Microsoft application, or should I prompt the user for the location of
thier copy of Primavera?

Thanks!

Dustin
 
G

Guest

Check the Compact On Close option (Tools, Options, General Tab)

As to where the app is, I would suggest you include a one row, one field
table, or add a record for it if you have an application system table. Then
the first time a user has to access the P3 app, use the Dir() function to see
if it is where it should be. If it is not, present a file open/save dialog
and let the user navigate to it. Save the location in the table, so next
time, you can get the path from there without having to bother the user again.
 
G

Guest

Thanks, that helped alot.

As for the application path...I was hoping to avoid having to do that, but
oh well...

Thanks!

Dustin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top