Setting Visible property between forms

G

Guest

When I set a visible property for a two labels on a form based on the
information from a second form, I'm getting an issue with one of the labels
not becoming visible based on which order the code is in.

Private Sub Form_Current()

If Me.PositionApplied1 <> "Site Coordinator" Then
If Form_frmApplicants.USResident = False Then
Form_frmApplicants.Label57.Visible = True
Form_frmApplicants.Label59.Visible = True
Else: Form_frmApplicants.Label57.Visible = False
Form_frmApplicants.Label59.Visible = False
End If
End If

If Me.PositionApplied1 <> "Site Coordinator" Then
If Form_frmApplicants.Over18 = False Then
Form_frmApplicants.Label57.Visible = True
Form_frmApplicants.Label58.Visible = True
Else: Form_frmApplicants.Label57.Visible = False
Form_frmApplicants.Label58.Visible = False
End If
End If
End Sub

In this instance, Label57 for the USResident checkbox will not appear, but
will appear for Over18 checkbox. If I switch the order and have the Over18
checkbox code first, Label57 will appear for USResident, but not for Over18.
Any suggestions?
 
D

Damon Heron

You only have to ask the Site Coord.. question once.
pseudo code:
if Position <> SC then
if Applicant<> USRes or Applicant<> (>18) then
57=T
59=T
Else
57= F
59 =F
End if
End if

Damon
 

Ask a Question

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.

Ask a Question

Top