>Thanks Hilmar for replying
>
>I think i would go with creating when Save is clicked but i have another problem with that. my form is a one to many form and this autonumber is the field that sets the relation between both the tables, and in my form i have field from both the table and when i click Add the fields from the child table are not enabled (i'm using the wizstlye text buttons).how to avoid this.
I am not sure how to do this. Personally, I use primary keys which the user doesn't see (see my article on primary keys), and assign them the moment the record is created, NOT when the record is saved.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)