A
Angi
My subform is continuous forms of contacts. On that form, I've created
a View button that should only be visible if that person has a home
office. The View works great! The problem I'm having is if one of the
contacts do not have a home office, it doesn't display the button for
anyone. If they all do, then it does. The HomeOffice field is a
yes/no. I'm pretty sure the problem is because I'm putting the code in
the FormLoad event and it's continuous so it doesn't look at each one
(?), but I don't know how to get it to look at each record if this is
the problem. I thought that's what I was doing by connecting the two
by ContactID. Sorry if this is confusing.
Here's my code:
Private Sub Form_Load()
If HomeOffice = True Then
Me!cmdHOffice.Visible = True
End If
End Sub
Thanks!
a View button that should only be visible if that person has a home
office. The View works great! The problem I'm having is if one of the
contacts do not have a home office, it doesn't display the button for
anyone. If they all do, then it does. The HomeOffice field is a
yes/no. I'm pretty sure the problem is because I'm putting the code in
the FormLoad event and it's continuous so it doesn't look at each one
(?), but I don't know how to get it to look at each record if this is
the problem. I thought that's what I was doing by connecting the two
by ContactID. Sorry if this is confusing.
Here's my code:
Private Sub Form_Load()
If HomeOffice = True Then
Me!cmdHOffice.Visible = True
End If
End Sub
Thanks!