try
If Me!MainFormControl = "some value" Then
Me!SubformControlName.Visible = False
Else
Me!SubformControlName.Visible = True
End If
or, the same code in shorter form
Me!SubformControlName.Visible = Not (Me!MainFormControl = "same value")
(the above is a single line.)
if the value may be already present on the current record, put the code in
the form's Current event procedure. if the value may be changed in the
current record by the user, put the code in the AfterUpdate event procedure
of the control where the value is stored.
hth