
Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Hi Dirk,
just found the problem, there was some old code on a unused form that it is
not being used anymore. It seem that I have some more clean up to do, but
the stange thing is when I was compiling before this error was not hapenning
at all, so I am starting to think that may be the db is getting corrupted.
BTY how do I decompile a db
Thanks
Alain
> The only thing that occurs to me now is that your form or database may
> be corrupt in some way. If so, possibly you could cure it by
[quoted text clipped - 32 lines]
>>> I don't see any reason that should not work. Are you sure the error
>>> is occurring on that line, referring the NewRecord property?
Dirk Goldgar - 26 Apr 2005 18:28 GMT
> Hi Dirk,
>
[quoted text clipped - 5 lines]
>
> BTY how do I decompile a db
1. With the database closed -- no users in it at all -- and (ideally)
Access not running, make a backup copy.
2. On the task bar, click Start -> Run...
3. Enter this (adapted to match your database path and name) in the Run
dialog box and click OK:
msaccess.exe /decompile "C:\My Documents\YourDBName.mdb"
You may need to include the full path to msaccess.exe, but I don't find
that to be the case when I try it. Depending on your Access version,
you may not get any sign that anything in particular happened. Your
database will probably open in Access.
4. Compact and Repair your database.
5. Open the database again, press Alt+F11 to switch to the VB Editor,
and click Debug -> Compile (your project). If any errors appear, fix
them and recompile.
6. Close the VB Editor. Compact & Repair again.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
postman - 29 Apr 2005 07:47 GMT
Excuse me for jumping in, but will decompiling fix these two problems I had
trouble with & just in case it happens again: 1. Access shut down before I
was able to close the database window, it won't open at all and throws an
database not MS Access blabla.., I eventually rewrote the whole thing. & 2.
I have been testing my new database so have accrued a number of entries in
all my tables & will need to get rid of them (returning record numbers to 0
for when I deploy it.
Thanks.
>> Hi Dirk,
>>
[quoted text clipped - 28 lines]
>
> 6. Close the VB Editor. Compact & Repair again.
Dirk Goldgar - 29 Apr 2005 16:57 GMT
> Excuse me for jumping in, but will decompiling fix these two problems
> I had trouble with & just in case it happens again: 1. Access shut
[quoted text clipped - 3 lines]
> have accrued a number of entries in all my tables & will need to get
> rid of them (returning record numbers to 0 for when I deploy it.
The first problem sounds like a different kind of corruption, and not
one that I would expect decompiling to solve, I'm sorry to say. I
suggest you read Tony Toews' Corrupt Access MDBs FAQ page:
http://www.granite.ab.ca/access/corruptmdbs.htm
The second problem, or rather wish, can generally be accomplished by
deleting all the existing records, then compacting the database by
clicking the menu items Tools -> Database Utilities -> Compact and
Repair Database... If that doesn't reset the autonumbers to zero, your
installation of Access and Jet is probably not up to date, and you
should visit Office Update to patch it.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)