Multiple If criteria in code

G

GD

How would I go about coding something on my list below to be visible if there
was more than one criteria, i.e. the box is checked AND the $ amount of, say,
Text1 is less than $2000?

Private Sub Form_Current()
Combo206.Visible = Check195
Combo269.Visible = Check195
Text267.Visible = Check195
Label300.Visible = Check195Combo213.Visible = Check209
Text215.Visible = Check209
Text217.Visible = Check209
Label221.Visible = Check209
Combo219.Visible = Check209
End Sub

I appreciate your time and effort!
 
D

Douglas J. Steele

Something like

Private Sub Form_Current()
Me.Combo206.Visible = (Me.Check195 And Me.Text1 < 2000)
Me.Combo269.Visible = (Me.Check195 And Me.Text1 < 2000)
Me.Text267.Visible = (Me.Check195 And Me.Text1 < 2000)
Me.Label300.Visible = (Me.Check195 And Me.Text1 < 2000)
End Sub

Incidentally, do yourself a HUGE favour, and rename your controls to
something meaningful!
 

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