A valid record object is required before most record operations can take place. You need to pass a valid CTTable object to the CTRecord() constructor.
// create a CTRecord object
CTRecord ARecord = new CTRecord(ATable);
After the record object has been created, but before any record operations can take place, the table associated with the record object must be opened.