OK, Jason.
1. What I meant by 'relation' was: Do you have a relation set with the SET RELATION .... command?
2. Using the default datasession is fine, although if your user has several forms open at once you could have problems. A better way would be to use a private DS for the VotersFile form and set the FieldDetail table to MODAL and Default DS. This forces the FieldDetail table to use the same DS as the VotersFile form, but both will be separate from other forms.
3. No code? Presumably you are using Wizard code or framework code. Something is appending the new record, after all < grin >. I suggest you add an 'Assert .f.' to the CLICK() method of your add button. Don't forget to also add 'DODEFAULT()' so the original code is also called. Then walk through the code and see where the record # changes.
Barbara
>Hi Barbara!
>
>First of all, thanks for your reply.
>
>To answer your questions>
>
>1. The relation between my parent (votersfile) and child ( fielddetail) is as follows:
>
>votersfile: nfieldid = pk numeric data type
>fielddetail: nfieldid = fk numeric data type and regular index.
>
>This is a one to many relationship.
>
>2. I am using a default data session for both tables. Is that ok?
>
>3. I have no code in my add() on my buttonset. I have never placed code in the add () of my buttonset before. This may be a big problem, but I do not know what to place in there for code.
>
>
>Once again, thanks for the help Barbara and I look forward to your reply.
>
>Talk to you soon
>
>jason