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.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.