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 already have written code to loop through the records in the table and find the records that will become the form controls. I need help creating a loop that will place the text boxes on the form.
If rst.boolean.value=true then
<create text box on form with rst.field2.value as label caption>
I need each successive text box to place itself aligned with the previous.
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.
I've found a reference to doing this by changing the label to a text box, and setting it's control source to to a text string. I've tried setting the control source ="Label Text" but this is not working.
[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.
If I would shrink the label size then corresponding Text box also shrink.
As I want to shrink or resize only Label field and Text field size remain same