Why does an Access file not open twice in a row?

G

Guest

If I open an Access database (.mdb) file, close it, then try to reopen it,
nothing happens. I must hit Ctl+Alt+Del, go to Processes in Task Manager and
stop MSACCESS.EXE, then I can reopen same file. In the directory where the
database file resides, another file with the same name and the extension .ldb
is created and left, but it doesn't affect whether the database file opens.
This is a 1 month-old Toshiba Laptop, which has MS One Note 2003 preloaded
and had a trial version of Office 2003, which I removed. I moved my Office
2000 to this laptop and am opening the database file with Access 2000.
 
A

Arvin Meyer [MVP]

It isn't closing properly. Typically, that's because you have a coding
problem:

1. You have an open recordset a database will often hang. Make sure that any
recordset that you open is explicitly closed.

2. If you have a boolean control with an implicit statement, change it to an
explicit one.

Not:

If Me.chkWhatever Then

Instead:

If Me.chkWhatever = True Then
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
G

Guest

I am not a programmer, but a fairly experienced user. I'm not familiar with
some of the terms you've used. I don't think the problem is #1 because I can
open the database file, close it right away and get the same problem. I have
used this type of database for years without a problem until installing on
this laptop, which runs on Tablet edition of XP.
I'm not sure I have any boolean controls that are new. I am not familiar
with them and have never intentionally written one. Do you have any
suggestions as to where I might check them?
 
A

Arvin Meyer [MVP]

Boolean controls are often checkboxes. Recordsets are often used as record
sources for forms and reports which are not bound to the data. The checkbox
would usually require and action to cause the problem, but could simply be
part of any event:

Sub Form_Current()
If Me.chkWhatever Then
' Do something
End If
End Sub

The same is true of code opening a recordset. You need to see if code like
the aforementioned is in any form that opens when the database does.

To check if the problem is in Access, and not particular to your database,
try opening Access without any database. Also try opening the Northwind
sample database. Does your problem still exist?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 

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