I don't think there is a non transactional trigger that fires after the query is executed.
I supose you have coded an execute_query built-in somewhere in your form (I supose in key-exeqry trigger). The place for what you want is right after the execute_query built-in
There you can check QUERY_HITS of get_block_property and do whatever you want to hide the unpopulated item instances.
yes thanks for the reply, I realised after a while that I just need to add my loop after the execute_query.
There is one thing I don't understand: If the records are not populated, you don't need to loop to disable them. You just have to make your block insert allowed property false. Then, if the query returned only three records, and the user tries to navigate to the forth record, the system will issue FRM You cannot create records here (or something like that). Thus, hiding the records is enough.