Database Locked?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in my database that has a hyperlink to open Crystal Reports.
There I open a file and refresh data in a report. I then export the refreshed
report data via ODBC to my database and save it in a table that I query. Each
time I try to save the table I get a message that the database admin (me) has
placed the database in locked mode. I have to close the database in order to
be able to save the table??? How can I avoid that?
 
Ray,

I had a similar problem, that I solved by :

- Calling a VBScript file from Access:

Dim WScript As Object
Set WScript = CreateObject("WScript.Shell")
WScript.Run "C:\YourScriptFile.vbs"
Set WScript = Nothing

- Close Access:

Application.Quit

- Open Access and navigate to form (via VBScript), when Export is
finished:

Dim acApp
Set acApp = GetObject("C:\YourDatabaseName.mdb")
acApp.OpenForm "YourFormName"
Set acApp = Nothing


I have no problems with this implementation, to date. I have also
noticed a considerable performance improvment writing to the database
while it is closed.


Regards,
David Miller
 
Dave,

You'll have to give me a little more help on this. I'm not sure how to use
your code.
 
Back
Top