I gather that you make a selection from an unbound combo on the main form, wherein the main form is linked to the subform by some field that is common to both. If there are records, the Child / Master link property between the 2 forms is taking care of displaying the records.
You seem to be asking for a code solution but by not providing the code you've tried, you're not shedding much light on what's behind the form so far. Your post suggests that you're controlling the record(s) displayed via code now (because of the Else part) when that could be simply taken care of by the child/master link. Maybe all you need is to execute an Append query in code, then refresh the forms. First though, you'd need to ascertain if there are any records retrieved by the combo selection.
Maybe create a recordset, test for BOF and EOF being true (meaning there are no records) then execute the append query sql after the Else statement. For that I'd use the Execute method of the DoCmd object, then refresh.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.