Hi Nadihaha,
It sounds like your database has some corruption in it. Try these steps to
see if it resolves the issue for you:
Create a brand new database and immediately disable the Name Autocorrect
feature (see:
http://allenbrowne.com/bug-03.html for reasons why you want to
do this). Then import all objects from the suspect database into the new
database, one group at a time. In other words, import all tables (but not
linked tables), then import all queries, then all forms, etc. When importing
local tables, it is a good idea to click on the Options >> button and check
the options to import relationships (unless you suspect corruption in a
relationship), along with Menu/Toolbars and Import/Export Specs. If any of
the objects in the source DB are hidden, you'll need to first unhide them.
While Access will allow you to import all objects in one operation, the
experts at FMS, Inc. (a Microsoft Partner), have stated that it is best to
import objects one group at a time (Reference:
http://www.fmsinc.com/ubb/Forum12/HTML/000285.html).
Recreate any linked tables from scratch using File | Get External Data |
Link tables... Access can cache a lot of information about linked tables,
which may no longer be valid, so it's always best to recreate the linked
tables from scratch. You will need to set the checked references to match the
source database, along with any startup options set under Tools > Startup.
Going through this process often times solves corruption problems, because
you get a new set of the hidden system tables (the tables whose names start
with "MSYS"). These system tables are updated appropriately as you import
objects.
This may sound like a lot of work, but it really isn't. Creating a new
container DB, disabling Name Autocorrect, importing all objects one group at
a time, re-establishing any linked tables, setting startup options, and
setting references to match the source DB is usually a fairly quick
procedure. When you are in the Visual Basic Editor, in order to check that
the references match the source DB, you should do a Debug > Compile
ProjectName as well.
By the way, Lookup fields defined at the table (or query) level art thy
creation of the evil one. You might want to reconsider creating lookup
fields. See the 2nd Commandment of Access, here:
The Ten Commandments of Access
http://www.mvps.org/access/tencommandments.htm
Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________