Topics Search

Text-Based Controls: The Label

Text-Based Controls: The Label
Views: 83
A label is a control that serves as a guide to the user. It provides a static text that the user cannot change but can read to get information about another control on the form. You can also use it to display simple information to the user. Most controls on the form are not explicit at first glance and the user would not know what they are. Therefore, you can assign a label to the control as a help to the user.
Topcis: The Label, The Text Box, The Command Buttons, Combo and List Boxes, Radio Buttons, Check Boxes and Toggle Buttons.
Sponsored Links:

More topics

 

Data Controls: A Label

Preview
A label is a control that serves as a guide to the user. It provides a static text that the user cannot change but can read to get information about another control on the form or report. You can also use it to display simple information to the user. Most controls on the form or the report are not explicit at first glance and the user would not know what they are. Therefore, you can assign a label to the control as a help to the user.
 

Add controls based on boolean value

Preview
I want to add a text box to a form for each record in a table where [boolean]=true in a particular field in the table. I also want to assign the value in another field in the selected record to display as the label caption.

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.

For example:

If rst.boolean.value=true then
<create text box on form with rst.field2.value as label caption>
end if

I need each successive text box to place itself aligned with the previous.
 

Hiding Controls on Form Open Based on IF Statement

Preview
I have a form that includes a large amount of controls and sub-forms. Throughout the form I have a lot of different After Update events which change the visible property of controls on the form based on the value in another control.

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.
 

Windows Controls

Preview
A label is a control that serves as a guide to the user. It provides a static text that the user cannot change but can read to get information about another control on the form. You can also use it to display simple information to the user. Most controls on the form are not explicit at first glance and the user would not know what they are. Therefore, you can assign a label to the control as a help to the user.
 

Show Label & Text Box in Report based on Checkbox

Preview
I am attempting to show a label and textbox based on a checkbox in a report. The report is based on a SQL query joining two tables. The checkbox field is included in the query. Currently in the properties, I have the label and textbox .visible = false. I would like to set the label and textbox to
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
End If
End Sub

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.
 

The Windows Controls of a Form

Preview
A typical database is made of forms (and reports) and these objects are equipped with Windows controls that allow a user to interact with the computer. To create such a database, you add forms and reports to it. Then you populate them with the necessary objects. This is the essence of application design and you should know how to design the controls.
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.
 

Type mismatch

Preview
Yesterday I programmed (using macros) to enable and disable text fields based on an answer given in other text fields. I also programmed memo boxes to appear and disappear based on the same text boxes. Everything works fine, but today I changed the label (the title of the form- this is just a label it is connected to nothing). Now every time I switch from form view to design view I get the "Type mismatch" error.
 

Conditional Formatting of a label

Preview
In an Access 2010 form, I want to trigger a change of the text color of a label, when it's corresponding checkbox is selected (Simply checking the box is not enough for these users)

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.
 

How to hide a text field label when the field is null?

Preview
In MS Access 2003 report, how to hide the label attached to a text field when the text field is blank? Example: Field Name = [MiddleName]; the label for
[MiddleName] is [MidNameLbl]. If no middle name, I do not want the label to
 

Making Label visible based on checkbox

Preview
I am developing a driving safety checklist database for some co-workers and myself. So far I have one table that includes a few text boxes to get information like name, date, business purpose etc.

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.