Check if subform has records.

Check if subform has records.

Hi! :)

I have a mainform and a subform. I want to disallow that a record at the maiform can be deleted if there are records at the subform.

Please advise