Expressions don't work after database is closed.

C

Chuck

I have a DLookup expression in the header of a form. It works fine until a
close the database. When reopening, the expression displays an error. I can
then delete the control, make a new one and it works fine until I close the
database. The same thing is happening to a macro expression that I use to
open one form from the subform of another form. Why would these expressions
work as long as the database is not shut down and then fail when closed and
the reopened?
 
A

Arvin Meyer [MVP]

Chuck said:
I have a DLookup expression in the header of a form. It works fine until a
close the database. When reopening, the expression displays an error. I
can
then delete the control, make a new one and it works fine until I close
the
database. The same thing is happening to a macro expression that I use to
open one form from the subform of another form. Why would these
expressions
work as long as the database is not shut down and then fail when closed
and
the reopened?

Possibly corruption:

First, always work on a copy of the database. Working on the original may
make it impossible for a repair service to fix it.

Download a copy of JetComp.exe:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;273956

Try backing up your forms as text with the undocumented SaveAsText
LoadFromText functions:

http://www.datastrat.com/Code/DocDatabase.txt

Also have a look at the Microsoft KB article:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;209137

Then have a look at Tony Toews' Access Corruption FAQ at:

http://www.granite.ab.ca/access/corruptmdbs.htm

for some suggestions. Unfortunately, some corruption cannot be fixed - you
may need to create a new database, import what can be salvaged, and recreate
the rest.

Although it's a paid service, Peter Miller does an outstanding job of saving
corrupt databases. Try this URL:

http://www.pksolutions.com
 
C

Chuck

Thank you Arvin. I was afraid that might be the case, but I also thought it
may be a security issue or something else that I had not thought of.
 

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