added error checking to add record and number format to genform