Thanks leocg. This now works fine.