I have existing stock portfolios with stock items created some time ago.
When I try to use add trans , to show extra purchase of existing stock,  each time it 'corrupts' the db.

This may be due to misunderstanding of how to use add trans, but the result is a corrupt db

A drop down on Account number to select account (say X) from which purchase is made
Type is Deposit
Payee is selected
Category is selected
Share number and price are entered
Transaction OK
In navigation box under Stock Portfolios / Portfolio name, a new sub-entry occurs with stock name (all looking good at this point)
When I click on this new entry, it comes up with a list of the entries on the Account name X, and the Account name X has disappeared from Bank accounts!!!!:roll::roll::roll::roll:

I cannot correct this problem, and am obliged to go back to the previous start of day version, to recreate the db

Error happens every time I try:oops::?::?: