Crash of Access..

  • Thread starter Thread starter Tarek
  • Start date Start date
T

Tarek

Hello!

does anyone know why Access crashes when I use a form that contains another
form and sets the focus on one of the field of the child subform?
what I do exactly is that I open the main form and calls a procedure located
in the child subform that set the focus on one of its fields..
when the code line arrives to Me.myField.SetFocus, Access shows a message
alert "Fatal error" with "Send report to MS" then Access closes..

if anyone know how to avoid this fatal error because the code is not
complicated at all, but it closes the database

Thanks for any suggestion
 
Recent versions of Access have a flaw that can be triggered by referring to
a field that is present in the subform's recordsource, but is not
represented by a control on the subform.

If you have that situation, try placing a text box for the field in the
subform. Set its Visible property to No if desired.

If that does not solve the problem, please post back. Anything else unusual
about the subform? Subquery in its source query? Dynamically reassigning its
RecordSource? Code in Current event of subform or parent that could affect
what's loaded?
 
Thanks Allen for the answer, it helped!


Allen Browne said:
Recent versions of Access have a flaw that can be triggered by referring to
a field that is present in the subform's recordsource, but is not
represented by a control on the subform.

If you have that situation, try placing a text box for the field in the
subform. Set its Visible property to No if desired.

If that does not solve the problem, please post back. Anything else unusual
about the subform? Subquery in its source query? Dynamically reassigning its
RecordSource? Code in Current event of subform or parent that could affect
what's loaded?
 
Back
Top