How can I write a code to check if the current record is first or last record. Thank you in advance, Tony