Need help please ! Working with tables

I have an application with a parent and child grid linked on partno.
When I want to add part details, I click on a part in the parent grid
and all the child records show up. I then click on the 'Add details'
button, a new line gets added, the part number gets filled automatically
from the previous line and everything is fine.
The problem is when there are no detail lines for the part. When I click
on the 'Add details' button to add the first line for the part, I get
the message 'Field partno cannot be modified'.
The 'Add details' OnClick procedure simple puts the table in edit mode
and runs a table.append
Help would be really appreciated
Thanks