98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsPrevious article Next article Access articles
Guide To Adding A Text Box Form Control In Access 2010
Tue 23rd August 2011
Suppose Access 2010 is launched and you've created a brand new database with one or more tables. The next step is usually to build forms. Each form is normally based on one or more tables. Once completed each form shows sets of controls with each control representing data from each table field.
In an Access form we can use controls to display or edit existing data from the underlying table or tables. Each control has two parts, a label and a text box. The label is the field name and the text box displays the actual record data when the form is in regular Form View. If you switch to Form Design view you'll see the controls show as pairs. The label is normally on the left and shows the field names. The corresponding text box, in Form Design view, also shows the name of the underlying field. Switch back to regular Form view and the label still shows the field name, but the text box now shows actual data. You can then edit or add new data for each record via the text box part of the form control. Of course when you view data using a form, you are still actually viewing the actual table data, so any changes made through the form actually change the table data.
When you create a form based on a table in this way, Access automatically creates one control for each field. So each control is bound or tied to a specific table field. You can see this if you look at the Properties Sheet for the control. To do this ensure you're in Form Design view, then select the text box part of a control, and in the Design tab click the Property Sheet command. In the Property Sheet select the All tab. Then look for the CONTROL SOURCE property near the top of the list. The data in the white box to the right is the field name the control source is bound to. If you click the down arrow to the immediate right of the field name, you'll see a list of all the available fields from the underlying table.
Suppose you add a brand new field to the underlying table. Once done, the form based on the same table is then out of date as it doesn't include the new field. You can the new field to the form by first adding a new text box control and then bind that new control to the new field. To do this in form design view, ensure the Design tab is selected. The in the Controls group of commands choose the text box. The command has a lower case "ab" on it. Then in some clear space on the form draw an arbitrary sized text box. Be sure to leave some space left of where you drag the text box, for the label, which appears to the left of the text box. Notice that the text box shows as UNBOUND when first added.
To bind the new text box to the new field, select the text box, then Properties Sheet. Click the pop down just right of CONTROL SOURCE and choose the new field name. Now the text box shows the correct field name the box is bound to. You may want to resize the new text box to match the size of the other form controls. To show the correct field name in the new label, click once in the label to select it, then click once more to enter edit mode. Now just type the new label by hand and click off the label to complete. Save the form design changes and switch back to regular Form View. The new control will now be correctly labelled and will show data from the bound field.
You can amend a text box Form controls to give you wider control over selecting data to enter, by converting the control in form design to a Combo or List box type. A Combo control is a combined text box and pop down lookup list - hence the name Combo. A List box is a combined text box and always open list. In both cases you can select new data to add to the table field using a data list you can create separately.
Interested in learning more about Access 2010 form controls? A really effect way is to attend a training course. That way you can learn lots more about Access 2010 with plenty of hands on practice under guidance. So you can really boost your skills in using Access 2010.
Author is a freelance copywriter. For more information on microsoft access courses london, please visit https://www.stl-training.co.uk
Original article appears here:
https://www.stl-training.co.uk/article-1868-adding-text-box-form-control-access-2010.html
London's widest choice in
dates, venues, and prices
Public Schedule:
On-site / Closed company:
TestimonialsHesley Group
Quality Governance Manager Mike Cleasby Crystal Reports Introduction Very well facilitated. I would have liked the course handbook prior to the course commencing. HM Land Registry
Rhonda G Access Advanced Very helpful and approachable. World Nuclear Association
Visiting Research Officer Byungho Lee Project Management - Managing Teams & Stakeholders It would be perfect if trainer provide case study(sucess and failure) for project management. |
PUBLICATION GUIDELINES