November 2006. Applies to: Microsoft SQL Server 2005. Summary: One way to create applications that use Microsoft Office Access for creating user. Microsoft Access Performance Tips to Speed up Your Access Databases by Dan Haught, Executive Vice President, and Luke Chung, President of FMS. This paper is featured on. Introduction to controls - Access. This article describes the different kinds of controls available in Access, and shows how to add controls to forms and reports. Controls are the parts of a form or report that you use to enter, edit, or display data. For example, a text box is a popular control for displaying data on reports, or for entering and displaying data on forms. Other popular controls include command buttons, check boxes, and combo boxes (drop- down lists). In this article. Understand controls. Understand layouts. Read/write String. Microsoft-Access Tutorial. Soren Lauesen. E-mail: [email protected]. Version 2.4b: July 2011. The hotel system.4. Back to Free MS Office Tutorials Press Ctrl+F to search for a word. Microsoft Access Glossary. Understand controls. Controls let you view and work with data in your database application. The most frequently used control is the text box, but other controls include command buttons, labels, check boxes, and subform/subreport controls. Controls can be bound, unbound, or calculated: Bound control A control whose source of data is a field in a table or query is called a bound control. You use bound controls to display values that come from fields in your database. The values can be text, dates, numbers, Yes/No values, pictures, or graphs. For example, a text box that displays an employee's last name might get this information from the Last Name field in the Employees table. Unbound control A control that doesn't have a source of data (such as a field or expression) is called an unbound control. You use unbound controls to display information, pictures, lines or rectangles. For example, a label that displays the title of a form is an unbound control. Calculated control A control whose source of data is an expression, rather than a field, is called a calculated control. You specify the value that you want to use as the source of data in the control by defining an expression. An expression can be a combination of operators (such as = and + ), control names, field names, functions that return a single value, and constant values. For example, the following expression calculates the price of an item with a 2. Unit Price field by a constant value (0. You can then bind forms and reports to those tables or queries, and the calculations appear on the forms or reports without needing to create a calculated control. When you create a form or report, it is probably most efficient to add and arrange all the bound controls first, especially if they make up most of the controls on the object. You can then add the unbound and calculated controls that complete the design by using the tools in the Controls group on the Design tab in Layout view or Design view. You bind a control to a field by identifying the field from which the control gets its data. You can create a control that is bound to the selected field by dragging the field from the Field List pane to the form or report. The Field List pane displays the fields of the form's underlying table or query. To display the Field List pane, open the object in Layout view or Design view, and then on the Design tab, in the Tools group, click Add Existing Fields. When you double- click a field in the Field List pane, Access adds the appropriate type of control for that field to the object. Alternatively, you can bind a field to a control by typing the field name in the control itself (if the object is open in Design view), or in the Control Source property box in the control's property sheet. The property sheet defines the characteristics of the control, such as its name, the source of its data, and its format. To display or hide the property sheet, press F4. Using the Field List pane is the best way to create a bound control for two reasons: Access automatically fills in the control's attached label with the name of the field (or the caption defined for that field in the underlying table or query), so you don't have to type the control's label yourself. Access automatically sets many of the control's properties to the appropriate values according to the properties of the field in the underlying table or query (such as the Format, Decimal Places, and Input Mask properties). If you already created an unbound control and want to bind it to a field, set the value in the control's Control Source property box to the name of the field. For details about the Control Source property, press F1 while the cursor is in the property's drop- down list. Top of Page. Understand layouts. Layouts are guides that align your controls horizontally and vertically to give your form a uniform appearance. You can think of a layout as a table, where each cell of the table is either empty or contains a single control. The following procedures show how to add, remove, or rearrange controls in layouts. Note: Layouts are optional if you are building a desktop database that will only be opened by using Access. However, if you plan to publish the database to a Share. Point server and use it in a browser, you must use layouts on all forms and reports that you want to use in the browser. For more information about Web databases, see the article Build a database to share on the Web. Layouts can be configured in many different ways, but are usually configured in a tabular or a stacked format. Within these two main formats, you can split or merge cells to customize the layout to better suit your controls. For more information, see the section Split or merge cells in a layout. In tabular control layouts, controls are arranged in rows and columns like a spreadsheet, with labels across the top, as shown in the following illustration: Tabular control layouts always span two sections of a form or report. Whichever section the controls are in, the labels are in the section above. In stacked layouts, controls are arranged vertically like you might see on a paper form, with a label to the left of each control, as shown in the following illustration: Stacked layouts are always contained within a single section on the form or report. Access automatically creates tabular layouts in either of the following circumstances: You create a new report by clicking Report in the Reports group on the Create tab. You create a new report by clicking Blank Report in the Reports group on the Create tab, and then dragging a field from the Field List pane to the report. Access automatically creates stacked layouts in either of the following circumstances: You create a new form by clicking Form in the Forms group on the Create tab. You create a new form by clicking Blank Form in the Forms group on the Create tab, and then dragging a field from the Field List pane to the form. In this section. Create a new layout. Switch a layout from tabular to stacked, or from stacked to tabular. Split one layout into two layouts. Add rows or columns to a layout. Remove rows or columns from a layout. Split or merge cells in a layout. Rearrange controls in a layout. Add controls to a layout. Remove controls from a layout. Create a new layout. On an existing form or report object, you can create a new control layout by doing the following: Select a control that you want to add to the layout. If you want to add other controls to the same layout, hold down the SHIFT key and also select those controls. On the Arrange tab, in the Table group, click Tabular or Stacked. Access creates the layout and adds the selected controls to it. Top of section. Switch a layout from tabular to stacked, or from stacked to tabular. To switch an entire layout from one type of layout to the other: Select a cell in the layout that you want to change. On the Arrange tab, in the Rows & Columns group, click Select Layout. On the Arrange tab, in the Table group, click the layout type you want (Tabular or Stacked). Access rearranges the controls into the layout type that you want. Top of section. Split one layout into two layouts. You can split a control layout into two layouts by doing the following: Hold down the SHIFT key and click the cells that you want to move to the new layout. On the Arrange tab, in the Table group, click the layout type you want for the new layout (Tabular or Stacked). Access creates a new control layout and adds the selected controls to it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |