Check Box entry to view other text boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a check box that I want to use to view several text boxes if it is
selected on my report. Such as..If it is selected I want to make visable
three seprate text boxes, text box 1, text box 2 and so on. If it is not
selected I do not want these text boxes to show on my report.
 
In the OnPrint event of the section where this text boxes located in you can
write the code

Me.[TextBox1Name].Visible = Me.[CheckBoxName]
Me.[TextBox2Name].Visible = Me.[CheckBoxName]
Me.[TextBox3Name].Visible = Me.[CheckBoxName]

So if the check box is true it will make the text boxes visible
 
The report is being exported to Excel.

Ofer Cohen said:
In the OnPrint event of the section where this text boxes located in you can
write the code

Me.[TextBox1Name].Visible = Me.[CheckBoxName]
Me.[TextBox2Name].Visible = Me.[CheckBoxName]
Me.[TextBox3Name].Visible = Me.[CheckBoxName]

So if the check box is true it will make the text boxes visible

--
Good Luck
BS"D


TKM said:
I have a check box that I want to use to view several text boxes if it is
selected on my report. Such as..If it is selected I want to make visable
three seprate text boxes, text box 1, text box 2 and so on. If it is not
selected I do not want these text boxes to show on my report.
 
I am trying to do a test and it does not work. Seems simple enough but
nothing. Logic is if check box is true then make another text box visible.
Any other ideas?

Thanks again

Ofer Cohen said:
In the OnPrint event of the section where this text boxes located in you can
write the code

Me.[TextBox1Name].Visible = Me.[CheckBoxName]
Me.[TextBox2Name].Visible = Me.[CheckBoxName]
Me.[TextBox3Name].Visible = Me.[CheckBoxName]

So if the check box is true it will make the text boxes visible

--
Good Luck
BS"D


TKM said:
I have a check box that I want to use to view several text boxes if it is
selected on my report. Such as..If it is selected I want to make visable
three seprate text boxes, text box 1, text box 2 and so on. If it is not
selected I do not want these text boxes to show on my report.
 
I would check the value returned in the check box.

When the cursor located in this line
Me.[TextBox1Name].Visible = Me.[CheckBoxName]
Press F9 (red line apear)

Run the report to see if the code stop at this line, if it does check the
value in the check box using the Immidiate window (press Ctrl + G) and type
?Me.[CheckBoxName]
and press enter to check the value returned.

Also, add the Nz Function to return False incase the check box is null
Me.[TextBox1Name].Visible = Nz(Me.[CheckBoxName],False)

--
Good Luck
BS"D


TKM said:
I am trying to do a test and it does not work. Seems simple enough but
nothing. Logic is if check box is true then make another text box visible.
Any other ideas?

Thanks again

Ofer Cohen said:
In the OnPrint event of the section where this text boxes located in you can
write the code

Me.[TextBox1Name].Visible = Me.[CheckBoxName]
Me.[TextBox2Name].Visible = Me.[CheckBoxName]
Me.[TextBox3Name].Visible = Me.[CheckBoxName]

So if the check box is true it will make the text boxes visible

--
Good Luck
BS"D


TKM said:
I have a check box that I want to use to view several text boxes if it is
selected on my report. Such as..If it is selected I want to make visable
three seprate text boxes, text box 1, text box 2 and so on. If it is not
selected I do not want these text boxes to show on my report.
 
Back
Top