Private Sub TextFields_Leave(sender As Object, e As EventArgs) Handles notes.Leave,
dateofpurchase.Leave, purchaseprice.Leave, dateofsale.Leave, saleprice.Leave,
grade.Leave, country.Leave, year.Leave, mintmark.Leave, variety.Leave,
denomination.Leave, quantity.Leave
Dim IndividualCoin As XmlNode
Dim root As XmlNode = doc.DocumentElement
Dim strCoinEntry As String
Dim strFieldName As String = sender.Name
Dim strContents As String = Me.Controls.Item(strFieldName).Text
strCoinEntry = "'" & lstDescriptions.SelectedItem & "'"
IndividualCoin = root.SelectSingleNode("descendant::singlecoinentry[description=" &
strCoinEntry & "]")
IndividualCoin.Item(strFieldName).InnerText = strContents
doc.Save(coinsFilePath)
End
Sub