Hi, thanks for the reply.
Maybee I have not understood you but the subforms control is not available
when there are no records so I can not use the controls eo enter event to
create a record ?.
Thanks
AMJ
> Hi, thanks for the reply.
>
[quoted text clipped - 5 lines]
>
> AMJ
It works for me...I just tired it. When you load up the form, the sub-form
will be blank, and not show any records, but if you click on the sub-form,
then the on-enter code DOES run and fire. Remember, we talking about the
sub-form control...not the actual form used for the sub-form,and NOT any
contrls on the sub-form.
It is possible your setting the sub forms data in code? (or are you using
the link child/master fields to maintain the relationship to the main form).
If you just using a standard main form, and sub-form (both bound to their
respective tables), then this should work. I suppose you could place a
button on the main form to "edit", or run the sample code, but it should
work just fine in the on enter event of the *sub form control*...not the
actual sub-form.
So, I NOT using any events on the actual sub-form, but am using the sub-form
control....

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com