I would do it almost the same way, but with a slight twist.
Add three Text Boxes, and name them as Text1, Text2, and Text3. Add a
CheckBox and name it Check1. Now, right click on the CheckBox, select
Properties > Event > OnClick, click on the three dots and paste this into the
window that opens:
Option Compare Database
Private Sub Check1_Click()
If Check1 = True Then
Me.[Text1].Visible = True
Me.[Text2].Visible = True
Me.[Text3].Visible = True
Else
Me.[Text1].Visible = False
Me.[Text2].Visible = False
Me.[Text3].Visible = False
End If
End Sub
Close the Form to save your changes. Open it, and viola!
Regards,
Ryan---
--
RyGuy
fredg said:
Hi, I am building an Access Application. On one of my form, I have
checkboxes and other thext fields. I would like to only show the text fields
if the combobox is true (checked).
How many text controls? Just a few?
Code the Check Box's AfterUpdate event:
Me.[Control1].Visible = Me.[ComboName]
Me.[Control2].Visible = Me.[ComboName]
Me.[Control3].Visible = Me.[ComboName]
etc.
Place the same code in the form's Current event.