Private Sub cmdAddtoBody_Click()
If IsNull(Me.txtNumber) = True Or IsNull(Me.cmbHours) = True Or IsNull(Me.cmbOpen) = True Or _
IsNull(Me.txtWork) = True Or IsNull(Me.txtnotes) = True Then
MsgBox "All Fields are Required" 'All fields are required for a line item (record) to be valid.
Else: DoCmd.Save acForm, "main" 'Add the record to the temporary table.
DoCmd.GoToRecord acDataForm, "main", acNewRec
With Me.test 'Requery the subform to show the records that have been saved in the table.
.Requery
End With
End If
End Sub