Gene, is the data in FoxPro or a SQL database? I've seen a command for something like this in MySQL. Eric