No backup? - ouch. From the error you described (Record(s) can't be read; no read permission on'.....), my initial thought is that there is a security mdw file on the mdb and the username/password you're using doesn't have read permissions on the table (unless you're able to open the tables directly without problems - can you do this?) If you do have security on the mdb, see this post: http://www.dbforums.com/showthread.php?t=1625527.
If there is a security mdw file, you need to open it with a username and password that allows you read permissions. The problem could also be related to this error: "compile error:user-defined type not defined" - I'd check that a reference isn't missing. Check the references when viewing the code (Tools->References) to make sure none of them have "missing".
Also, the problem could very highly be related to this: Dim TABLE As Recordset, as it doesn't look right to me. TABLE is a keyword that you don't want to Dim as a recordset and can most likely be giving you problems. Try replacing all the "TABLE" wording with something like "RS". If you can, perhaps zip the mdb and attach it and we can help you diagnose the problem (unless you have a security mdw file on it.)
You can also try opening the mdb using the /decompile option, or try compacting/repairing, or try importing the tables, forms, reports, modules, etc into a new mdb file.
Make a backup (copy/paste) of your mdb. I do this everytime before I get into the mdb and start coding. If the mdb is large in size due to the table sizes, you may want to consider splitting the mdb so you can easily copy/paste the frontend before you start coding.
Last edited by pkstormy; 12-15-07 at 02:02.
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)