new record shuts database

  • Thread starter Thread starter Mark Remesnitskiy
  • Start date Start date
M

Mark Remesnitskiy

Hi everyone,
I have form with subform, and it was working well to some
point of time, but than when I enter new record in form
and go to subform, or tried to close form, whole program
shuts down, come up error dialog box with choice to
report to Microsoft, than make backup file, compress and
repair database.
After opening database again, it is navigating around
form and subform without any problem.
Each new record - everything comes again.
I tried to delete some records, created new database and
import tables, queries and forms from previous - one
nothing helped
I'm runing Access 2002 on Windows 2000 and XP, on both
some results.

Is anybody have any idia what is going on, and how to
solve this problem

Thanks,
Mark
 
Hi Mark,

Sounds like one of the ugly manifestations of a corrupt db. To fix this you
can either create a new mdb and import all objects into the new mdb or ou
can use the undocumented decompile. Personally I find decompile to be an
easier method of recovering from corruption - just be sure to follow the
precautions listed in the articles sited below.

Here are a couple of links on decompile. They are written for Access97 but
the same method works for Access2000. Be sure to make a copy of your mdb
before you decompile. I've never had any trouble but . . . backups are
always a good thing anyway.

http://www.mvps.org/access/bugs/bugs0008.htm
http://www.trigeminal.com/usenet/usenet004.asp

Also check Tony Toews' page on corruption -
http://www.granite.ab.ca/access/corruptmdbs.htm.

Good luck!
 
Some suggestions.

1. Turn off the Name AutoCorrect check boxes under Tools | Options |
General. Then compact the database to get rid of any corruption. More info:
http://allenbrowne.com/bug-03.html

2. Open the main form in design view. Right-click the edge of the subform
control and choose Propeties. Note the fields in the LinkMasterFields and
LinkChildFields properties (Data tab of Properties box).

3. Whichever fields are nominated in the LinkChildFields, make sure they
exist as a *control* in the subform. Usually this means adding a text box to
the subform for your foreign key, and setting its Visible property to No.
Although Access should be able to manage even if the field is not
represented by a control (and used to be able to do so), recent versions
crash and this should solve the problem.

4. If the problem persists, are any of the fields listed in LinkMasterFields
not bound to a table field? If so, Access may misunderstand the data type.
If it is a calculated text box, set its Format property to "General Number"
or whatever is suitable so Access knows the type. If it is a calculated
query field, typecast in the query, e.g. CLng([MyField] + [AnotherField]).
More info:
http://allenbrowne.com/ser-45.html

Step 3 should solve the problem. If it does not, check that you have at
least SP2 for Office XP, and SP8 for Jet 4. The service packs are available
from support.microsoft.com

If none of that works, do you have subqueries in the subform's Recordsource?
 
Hello,
Thank you for help, but unfortunately nothing did help.
I've tried everything you suggested.
As I understand, if problem would be possible to solve by
these steps, db wouldn't work before, and in this case it
would not crashed when I close form, which happen now.
By the way, when I made changes according step 3,
property Visible-No didn't work.
All available updates I've install already.
Almost all my forms and subforms have queries in
Recordsource

Thanks,
Mark
-----Original Message-----
Some suggestions.

1. Turn off the Name AutoCorrect check boxes under Tools | Options |
General. Then compact the database to get rid of any corruption. More info:
http://allenbrowne.com/bug-03.html

2. Open the main form in design view. Right-click the edge of the subform
control and choose Propeties. Note the fields in the LinkMasterFields and
LinkChildFields properties (Data tab of Properties box).

3. Whichever fields are nominated in the
LinkChildFields, make sure they
exist as a *control* in the subform. Usually this means adding a text box to
the subform for your foreign key, and setting its Visible property to No.
Although Access should be able to manage even if the field is not
represented by a control (and used to be able to do so), recent versions
crash and this should solve the problem.

4. If the problem persists, are any of the fields listed in LinkMasterFields
not bound to a table field? If so, Access may misunderstand the data type.
If it is a calculated text box, set its Format property to "General Number"
or whatever is suitable so Access knows the type. If it is a calculated
query field, typecast in the query, e.g. CLng([MyField] + [AnotherField]).
More info:
http://allenbrowne.com/ser-45.html

Step 3 should solve the problem. If it does not, check that you have at
least SP2 for Office XP, and SP8 for Jet 4. The service packs are available
from support.microsoft.com

If none of that works, do you have subqueries in the subform's Recordsource?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I have form with subform, and it was working well to some
point of time, but than when I enter new record in form
and go to subform, or tried to close form, whole program
shuts down, come up error dialog box with choice to
report to Microsoft, than make backup file, compress and
repair database.
After opening database again, it is navigating around
form and subform without any problem.
Each new record - everything comes again.
I tried to delete some records, created new database and
import tables, queries and forms from previous - one
nothing helped
I'm runing Access 2002 on Windows 2000 and XP, on both
some results.

Is anybody have any idia what is going on, and how to
solve this problem

Thanks,
Mark


.
 
Thanks for help.
I've tried decompile, it didn't help yet, even it did
something.
Need to try something else, probably I need to read
instractions more carefully.
About criating new db, I've tried before, and import all
tables, queries and forms - nothing help, even another
problem came out too

Thanks,
Mark
-----Original Message-----
Hi Mark,

Sounds like one of the ugly manifestations of a corrupt db. To fix this you
can either create a new mdb and import all objects into the new mdb or ou
can use the undocumented decompile. Personally I find decompile to be an
easier method of recovering from corruption - just be sure to follow the
precautions listed in the articles sited below.

Here are a couple of links on decompile. They are written for Access97 but
the same method works for Access2000. Be sure to make a copy of your mdb
before you decompile. I've never had any trouble but . . . backups are
always a good thing anyway.

http://www.mvps.org/access/bugs/bugs0008.htm
http://www.trigeminal.com/usenet/usenet004.asp

Also check Tony Toews' page on corruption -
http://www.granite.ab.ca/access/corruptmdbs.htm.

Good luck!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Mark said:
Hi everyone,
I have form with subform, and it was working well to some
point of time, but than when I enter new record in form
and go to subform, or tried to close form, whole program
shuts down, come up error dialog box with choice to
report to Microsoft, than make backup file, compress and
repair database.
After opening database again, it is navigating around
form and subform without any problem.
Each new record - everything comes again.
I tried to delete some records, created new database and
import tables, queries and forms from previous - one
nothing helped
I'm runing Access 2002 on Windows 2000 and XP, on both
some results.

Is anybody have any idia what is going on, and how to
solve this problem

Thanks,
Mark

.
 
Back
Top