Check the value of ([Forms]![Main_Sub_Items]![frm_Main_sub_system].Form![txtRecordCount]
in the immediate window (Ctrl-G) by using the question mark:
I just tried using the Intermediate window and i get an error 2427 "You entered an expression that has no value"
I've tried checking for "" IsEmpty IsNothing IsNull but none of them seem to work. It doesnt like the fact that i'm checking the value of an unbound textbox which displays the number of records when there are no records to count. If i force at least one record in the table then the code works fine. It's just that initial state of no records it does not like :-(