I have a form displaying various details (tab control) for a magazine article. On one of these tabs is a list of items belonging to that article. There is a button that, when clicked, opens another form from which it is possible to edit the item details. There is also a button that opens the same form for ADDING item details.
This form contains an invisible textbox for the articleID.
Now, here is my problem...
When an item has been selected and the "Edit" button is clicked, everything performs as required. - The changes are made to the correct entry of the table, and the articleID is correct.
When the "Add" button is clicked the details are added to the table but they have the articleID set to 0 and not to the value of the article that is actually being edited...
I've tried setting the value of the articleID textbox control to the ID of the article being edited, but this doesn't work. I keep getting a "you cannot set the value of this control.." error!!!!
How can I get this to work as required? I do NOT want any user interaction at this point (so no selecting from a list...).
Any help you can offer will be greatly appreciated.