I have a form with 13 subforms (each in separate tab page). Those subforms are link to the form with primary key ID
. The ID
is generated on the fly by 3 fields on the form.
The problem is when I have filled those 3 fields (and have ID
generated) and jumps to the tab control, the tab page with first subform freeze.
I expected the cursor to go to the first field of the subform.
Current workaround is pressing Esc
once so that I can focus the control in the subform.
What could be the开发者_运维问答 cause of this problem and how could I solve this?
Edited: I set the lock in the subforms record. I removed those and it is working ok and finished entering data of 400 variables x 450 sets of question.
It sounds as if Access is getting confused, as you're only generating the new record & associated key once the first page of the subform is completed.
From my experience of Access, it's usually better to let the auto primary key functions do the work, rather than generate a composite key.
As such, could you generate a primary key independently (ie have an auto number), and use this as the association between the subsequent subforms?
精彩评论