Main form problem when focus goes to subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2002: When I enter new data in a main form, than tab to subform, main
form goes to the last record in the table.
Link is on three fields, common to both tables.
I have re-created the sub form, re-linked etc. no joy.
If I remove the subform and enter a trans into mainform, when I tab off I
just go to a new empty form.
Any ideas?
 
Note that I put messages at the Form events that have code in them: The form
has changed from the data I entered to the last record when I trigger the
After Update event.....
 
Ron said:
Note that I put messages at the Form events that have code in them:
The form has changed from the data I entered to the last record when
I trigger the After Update event.....

What happens if you move to the subform with your mouse? Are you sure your
cycle property is not taking to to a different record rather than taking you to
the subform?
 
Tab or mouse click gives same result. Both go to the first entry in the
sub-form.
Cycle is set to All Records. (never used this property....)
 
Ron said:
Tab or mouse click gives same result. Both go to the first entry in
the sub-form.
Cycle is set to All Records. (never used this property....)

So what is the code in your AfterUpdate event?
 
Ron said:
No code in After Update event. I just put in a msgbox to track the
steps

Well code or a macro is being called *somewhere*. Make a copy of your form and
in the copy go to the { Other } tab and set HasModule to No, then save. That
will remove all code from the new form in one fell swoop. See if the same
occurs with the copy. If not, then code in the original is causing the problem.
Macros or external function calls (if you use them) will need to be hunted down
separately.
 
You were right. Form worked OK with no code.
I will remove code step by step to find offender.
Thank you.
 
Back
Top