Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Sometimes you want to control the visibility (or other property) of one control

to be based on the value in another. This is the type of code you would use:
Code:
If Me.ControlName = "Whatever" Then
Me.OtherControlName.Visible = True
Else
Me.OtherControlName.Visible = False
End If
Depending on your situation, you might also want
cond control if you're making it invisible. You
r Update event of the control you're testing, so
it would execute the code. You might also want
which would fire when you change records.

to clear the contents of the se


would put that code in the Afte
that when you changed the value
the code in the Current event,

Similarly, to set a value in one control when another is changed (setting back i
s optional). In this case the first control is a check box and the second is a
date:
Code:
If Me.CheckboxName = True Then
Me.OtherControlName = Date()
Else
Me.OtherControlName = Null
End If

You might also like