Okay. I think I discovered what the problems is. I had a feeling that it
might be the table links that were causing the problem. So I deleted all
table links and the 2003 format version of my front end compacted just fine
by using the Access menu item.
I think the solution hinges on the following statement from a Microsoft
article:
"In Access 2002, the MSysAccessStorage table replaces the MSysAccessObjects
table when you convert to the Access 2002 file format."
I noticed in my dbWindow that I had a LINKED table called MSysAccessObjects.
My backends are still in A2000 format.
With all tables linked and this MSysAccessObjects table also linked, I cannot
compact. If I delete the MSysAccessObjects link, then compacting proceeds
just fine (although after deleting that link Access did crash a few times).
So my linking routine must be allowing system tables in the BACK-ENDS to be
linked.
I tried to stop this by rewriting the actual linking part of the code as
follows:
If (tdf.Attributes And dbSystemObject) = 0 Then
'Set the properties of the new link
'and append to the tabledefs collection
tdf.SourceTableName = TableToLink
tdf.Connect = ";DATABASE=" & BEFile
db.TableDefs.Append tdf
End If
So what was added was the tdf.Attributes and dbSystemObject.
I then deleted all table links and relinked using the code. The linked
MSysAccessObjects table continues to link. I then stepped through the code
and watched as each table was linked. All of the MSys tables were able to
pass into the If statement and linking was attempted.
It's probably important that I mention that I have revoked all permissions on
backend tables and use RWOP queries. Therefore, according to MS Security FAQ,
I have to use On Error Resume Next when I attempt to link to the backend
tables. So I may be getting errors that are actually stopping backend system
tables from being linked if they are identical in name to the front end
system table. I don't know. But, if this is true, it explains why I'm only
seeing the MSysAccessObjects table (and also MSysAccessXML) as being linked
in my front end. These tables are not local system tables within the front
end. Please verify that my understanding of this is correct. As I said, I
can't test it because MS forces me to use On Error Resume Next.
Either way, it looks like I have made major progress to resolving this issue.
Now I just need to figure out how to stop system tables that are located in
the back-end files from being linked to the front end.
Thanks.
Allen Browne wrote:
>Recreating the application as you did is a perfectly valid alternative to
compacting.
If the recreated application won't compact, but other databases do, then
presumably something is still corrupting it. I don't know what to suggest
beyond the usual prevention approaches suggested here:
http://allenbrowne.com/ser-25.html
Presumably the code in this database does compile, the references are fine,
and you have no other Wizard problems.
>>I forgot to mention. I downloaded the Jet Utility and WAS able to compact
my
[quoted text clipped - 27 lines]
>>>>why
wouldn't it allow me to code the application icon.
--
Message posted via
http://www.accessmonster.com