Text-Based Controls: The Label
Topcis: The Label, The Text Box, The Command Buttons, Combo and List Boxes, Radio Buttons, Check Boxes and Toggle Buttons.
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I.e. One of the controls has a label with the question 'Is the problem caused by a rain event?' and when the user selects 'yes' in the controlmore controls become visible which prompt the user for more information.
I have the same sort of thing set up on many controls in the form.
What I am trying to do now is get all of these individual controls to run when the form is opened - I.e. I am trying to write a script that will run the individual 'If' statements tohide/unhide controls based on the inputs stored in another control.
First of all I am not sure which event to run this on (I.e. On Open, On Load etc) and secondly I am not sure how to write a script that can handle multiple If statements that are notreliant on each other in the same event.
visible when the checkbox response = Yes.
I tried the OnLoad event of the form
Private Sub Report_Load()
If Checkbox = "Yes" Then
Label.Visible = True
Textbox.Visible = True
This didn't work. I am unable to define the event for the textbox and label directly because this is a report and not a form.
Form and report design consists of populating them with the necessary controls that would allow a person to use your database. To perform this design, you first open the form or report in Design View.
Topics: Control Design, Common Properties of Controls, Tables Columns and Windows Controls, Common Methods of Windows Controls, Common Events of Windows Controls, Windows Controls: The Label, Windows Controls: The Group Box, Windows Controls: The Text Box, Windows Controls: The Month Calendar, Windows Controls: The Date Picker, Windows Controls: The Time Picker, Windows Controls: The Command Button, Combo and List Boxes, Check Boxes and Toggle Buttons.
[MiddleName] is [MidNameLbl]. If no middle name, I do not want the label to
Then I have a few checkboxes, DUSK, DAWN, RAIN, SNOW ETC. Based on whether some of these boxes are checked, I want to be able to have a label displayed.
There will be 3 labels totaled, MINIMAL RISK, MEDIUM RISK, HIGH RISK. So for example if I fill out the form and if I have DUSK and RAIN checked, then the HIGH RISK label is visible and the othe r 2 labels are not etc.
How do I create a sequential list of records like this, each with a label number (and some other data from the form,
jpg) of the form's state On Load. As you can see the right checkbox as well as the right textbox are visible = false. For explanation,I will use the following as control names:
Name checkbox = chkName (located under the label Name)
Title checkbox = chkTitle (located under the label Title, currently hidden in this example)
Title textbox = txtTitle (located under the label Please Include Title, currently hidden in this example)
This form is opened by double clicking a textbox on another form and is used to select the persons who have taken part in a recent survey at a hotel. If chkName for Row 1 is ticked, chkTitle for Row 1 becomes visible.
If chkTitle is ticked, the textbox under the label "Please include Title" becomes visible for Row 1. Unticking these reverses their visibility. txtTitle has a default value that can be overwritten.