Updated Detail View of Master/Detail Form - How would I code this?

I have two Forms:

  1. Master Form - Ingredients
  2. Detail Form - Ingredients (Editable Grid)

These forms are using the same table. The Master form shows ALL editable fields while the Detail form shows only the Ingredient and description. I have a field called RecipeTitleLink. This field is the link between the Master/Detail form(s).

If I view an Ingredient the Master/Detail form shows as I want. When I go to Add a record and the Add form comes up when the LinkRecipeTitle field is BLANK the Detail form shows “Undefined Offset:0”. This is normal given that the RecipeTitleLink field is BLANK.

If the field is BLANK how would i code the Detail form to say something like “No Record(s) Found”? Thank yuou in advance for the assistance