Reginald, these things can be quite difficult to trace. Does it happen if
you just use the built-in navigation buttons to move record?
Suggestions to solve known issues and help pinpoint the culprit:
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html
2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact
3. If this is Access 2002 or 2003, open your subform in design view, and add
a text box for the field(s) named in the LinkChildFields property of the
subform control if you don't yet have a text box in the subform. You can set
its Visible property to No if you wish. Repeat for the other subform. Then
open the main form in design view. Clear the LinkChildFields property, and
enter it again so Access discovers it now links to a text box instead of an
AccessField.
4. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
5. Open Access, and compact again.
6. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html
7. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.
8. If you are using any code in the Current or Timer events of any of these
forms (main form or subforms), temporarily comment out the code.
At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
the code syntax is compilable, and a known bug with the AccessField type is
averted.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Reginald Bal" <rb**@rebit.be> wrote in message
news:IN**********************@phobos.telenet-ops.be...
Hello,
I created a main form with 2 subforms.
In an attempt to move to the next record (or new record) on the main form
I get the error " Method 'requery' of object '_Subform' failed".
The database closes after answering the popup window (Microsoft Access has
encounterd a problem and needs to close. .....)
Does anybody has an idea why I'm having this problem?
--
Reginald Bal