Microsoft Access Tutorial
|
|
|
|
| Articles Reviews Microsoft Access | |
| Written by Adi Bach | |
| Friday, 01 September 2006 | |
|
Page 18 of 22 Microsoft Windows family of operating systems greatly rely on controls to enhance interaction and usability between the application and the users. These controls come in various flavors for different purposes. The uses of these controls depend on the application, the control's own capabilities, and the purpose of the application. Controls Explorations If you have programmed in other languages, namely (Visual) C++, you are probably used to property sheets. In Microsoft Access, these are significantly simplified (in Microsoft Visual C++, property sheets and tab controls are really different and their programming is not related). To explore different implementations of the tab controls, we will go step by step and study their various uses. To make sure you understand how what we are about to do works, I would like you to create the database along with me. Start Microsoft Access and create a Blank database called Pierrot's Carry Out. From the Database Window, use the Table Wizard to create a table including the following fields: (from the Employees sample table) EmployeeID, DateHired, EmployeeNumber, Title, FirstName, LastName, Address, City, State, PostalCode, Country, HomePhone, (from the Mailing List sample) E-MailAddress, WorkPhone, Extension, Salary, (from the Contacts sample)MaritalStatus, EmrgcyContactName, EmrgcyContactPhone, Notes. Save the table as tblEmployees. Set the Input Mask of EmployeeNumber to 00-000-0;0;_. Access the Lookup Wizard for the Title and choose to Type the Values that you want; these values are Ms., Mr., and Mrs. In table Design View, create another table called tblCustomers with the following fields: CustomerID(Primary Key. AutoNumber), Customer Name, CustomerPhone (Input Mask = !(999") "000-0000), and Notes(Data Type: Memo). The Tab control: Now that you know how the tables in this database are created, open the Annie's Carry Out database. From the Database Window, choose to create a form in Design View based on the tblEmployees table. From the Toolbox, click the Tab Control and click on 1/8 and 1/8 on the form. Access the Properties for the tab control (here is one of the ways you can it: first make sure you have the Properties dialog on your screen, then on the Standard toolbar, from the Object combo box, choose the TabCtl0 object). Set the control's Tab Fixed Width to 1.98 (it might change to another value like 1.9799, which is fine). Access the Properties for the first page. Change its name to pgPersonalInformation and its Caption to Personal Information. Change the name of the second page to pgEmployeeDetails and its Caption to Employee Details. From the Field List, drag and drop, in the first page, EmployeeID, Title, FirstName, LastName, Address, City, State, ZIPCode, Country, HomePhone, and EMailAddress.
In the second page, drop DateHired, EmployeeNumber, WorkPhone, Extension, Salary, MaritalStatus, EmrgcyContactName, EmrgcyContactPhone, and Notes. Save the form as frmEmployees.
|
|
| Last Updated ( Friday, 02 January 2009 ) | |
| < Prev |
|---|








