title: Blank parent form if subform has no data
body: <p>i have my regular form with a continous form attached to it. Everything works fine untill the subform has no data.
  Here is the subform with data<br>
  image1 <a href="https://i.stack.imgur.com/eSE8b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eSE8b.png" alt="enter image description here"></a></p>
  
  <p>IF there are no data in the subform, the form becomes like this.<br>
  image 2 <a href="https://i.stack.imgur.com/lNnAx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lNnAx.png" alt="enter image description here"></a></p>
  
  <p>I am using the following code in my on current event on my main form:</p>
  
  <pre><code>Function RefreshCOunt()
  If Me.frmVerifyEquipmentSub.Form.Recordset.RecordCount = 0 Then
  
      Me.frmVerifyEquipmentSub.Visible = False
      Me.txtTotal = 0
      Me.Refresh
  
  Else
      Me.frmVerifyEquipmentSub.Visible = True
      Me.frmVerifyEquipmentSub.Form.Requery
      Forms![test3].txtTotal = Me.frmVerifyEquipmentSub.Form.txtSum
      Me.Refresh
      Forms![test3].Refresh
  
  End If
  End Function
  
  Private Sub Form_Current()
  Call RefreshCOunt
  End Sub
  
  Private Sub Form_GotFocus()
  Call RefreshCOunt
  End Sub
  </code></pre>
  
  <p>Here is the code on my subform, THis function is run when my user clicks the save button.</p>
  
  <pre><code>Function RefreshCOunt()
  If Me.txtCount = 0 Then
      Forms![test3].SetFocus
  Else
      Me.Requery
      Forms![test3].txtTotal = Me.txtSum
      Me.Refresh
      Forms![test3].Refresh
  
  End If
  End Function
  </code></pre>
  
  <p>I have a text behind the subform which says "NO Available Data to be shown"</p>
  
  <p>2 problems in this situation are:</p>
  
  <ol>
  <li><p>Empty form view as shown on image 2 (resolved as i had linked the record source of the main form to the table also used in subform)</p></li>
  <li><p>Hide the subform once the user has verified all the equipment.
  -currently my code only works the first time the form is loaded.
  -the subform does not hide once the user has verifed all the equipment</p></li>
  </ol>
  
  <p>I know how to do this in report with the HAsData function but i am not sure how i can do so in Forms.</p>