Many thanks mackrackit, it compiled cleanly after fixing that typo. Can't believe no one else has tried that sample code.