In Lightroom go to Preferences> General tab> Catalog settings, click "go to catalog settings"
Catalog Settings> Metadata tab> make sure you have "Automatically write changes to xmp"
Note this is not the default setting.
Thanks I had already made that change and noted the files were being updated, but yesterday I updated about 100 files and none of them came across to the xmp file. Not sure why. I rebooted my computer and it seems fine now. Thanks for your quick response it does seem to be working correctly now.