autoexec macro

  • Thread starter Thread starter Steve G
  • Start date Start date
S

Steve G

I tried posting this to another Access newsgroup, but have not received any
replies, so thought I might try here:

Access 2002
Windows 2000

I am using a bat file to open an Access 2002 database at a specific time
each day. When opened, I have an autoexec macro that runs specific queries.
After the queries run, the macro closes the database by using a Quit action.

After the database closes, the associated .ldb file is not closing, which is
creating some problems for us. This same process works well under Windows
98, however I can't figure out why it is not working correctly under windows
2000. I am suspecting it may be a permissions problem, but can't seem to
find the cure.

Any help would be much appreciated.

Steve
 
If the ldb file is not being deleted, it suggests that the windows user does
not have modify permissions on the folder where the mdb is.
 
Thanks for the response, Joan.

I am trying to using the task scheduler to open an Access 2002 database by
way of a .bat file. When the task runs, the database opens.

I suspect it has to do with permissions as well. The database is using the
administrator account to open, but when it closes, I think it is using the
system account, which would cause the above problem. As I understand it, if
an Access database is closed by something other than the account used to
open it, it will cause the ldb file to remain open.

Any ideas as to how I might fix this?

Thanks

Steve
 
Hi Steve,

Steve G said:
Thanks for the response, Joan.

I am trying to using the task scheduler to open an Access 2002 database by
way of a .bat file. When the task runs, the database opens.

I suspect it has to do with permissions as well. The database is using the
administrator account to open, but when it closes, I think it is using the
system account, which would cause the above problem.

Why do you think it is being closed by a different windows account?

If the macro includes a statement to close the database, it is doing this
with the same account that opened the database.

Otherwise, you might include a statement in your bat file that deletes the
ldb.
 
The reason I think that has to do with the research I did on what can cause
the ldb file not to close. It appears that other than corruption in the
database, which is not the case, the cause for this kind of behaviour is an
account trying to close the database that did not open it to begin with.

I am using the quit action available in Access to close the database, rather
than closing it from the .bat file.

Thanks,

Steve G
 
Back
Top