Thank you Ray, both for the general (re debug) and the specific (date being a reserved word) answers.That explains why all the other sections of the Terrier worked and this one didn't. For some reason I used date_recorded for all the others, so of course they worked!
Ian