Microsoft Access: Table Properites, Complex Forms Start with a new, blank Access database, Microsoft Access: Let’s create the tblPerson. We are going to use advanced properties for the table fields and create an advanced form. Microsoft Access Add a SSN input mask to the PersonID field using the Wizard. Microsoft Access Limit the first and last name to just 20 characters. Microsoft Access Limit the state to just two characters. Microsoft Access Program your own simple input mask for field PersonZipCode: The digit “0” is used to indicate a number is required. The “\” is used to display the next character as entered, which is the “-” hyphen in this case. There are required five digits, a hyphen, and then an optional four digit code. The last four digits indicate a more specific location within a given ZIP code. Since the last four digits aren’t always used, a 9 indicates the last four digits are optional. Microsoft Access Add a semicolon ; and a use a 0 (zero) to indicate that the hyphen should be stored with the data, or use a 1 if you don’t want to store the hyphen with the data. Using the value 1 can help save space in a large database because the hyphens (or other characters that you used in the input mask) won’t be stored. Microsoft Access Add another semicolon ; and type in the placeholder character you would like to use. The default placeholder is an underscore _ . Microsoft Access Program your own simple input mask for field PersonCreditCardNumber: The digit “0” is used to indicate a number is required. The “\” is used to display the next character as entered, which is the “-” hyphen in this case. There are 16 digits in the, in groups of 4 separated by hyphens. All digits are required, so we use a 0 (zero). Microsoft Access Then program the table to save the hyphens and to use the placeholder #. Microsoft Access Use DataType Date/Time for the PersonCreditCardExpirationDate. Microsoft Access Add the PersonCreditCardSecurityCode as DataType Text and program the Input Mask to be “000”. Remember, “0” is used to indicate that a digit is required. Three zeros in a row means three digits must be entered. Microsoft Access Add the field PersonCreditCardVerified as Data Type Yes/No. Microsoft Access The tblPerson so far. Microsoft Access Now that we know about programming input masks, let’s add an input mask for the two-letter state abbreviation. We don’t use 00 (zero-zero), but instead we use LL. The letter L indicates a letter is required, and users need to type two letters. Microsoft Access Now add a greater than sign > in front of the LL. The > sign converts all characters that follow to uppercase. Microsoft Access Program input masks for the first and last name fields. Add > and < symbols and then repeated ? (up to 20 total characters). The < symbol is used to indicate all following characters will be lowercase. Microsoft Access Program input masks for the first and last name fields. Add > and < symbols and then repeated ? (up to 20 total characters). The < symbol is used to indicate all following characters will be lowercase. Microsoft Access The completed tblPerson. Close the Table. Microsoft Access REMINDER: Forms are created to easily add raw data to your tables. Extra Information From the Microsoft Office website: “Forms in Access are like display cases in stores that make it easier to view or get the items that you want. Since forms are objects through which you or other users can add, edit, or display the data stored in your Access desktop database, the design of your form is an important aspect. If your Access desktop database is going to be used by multiple users, well-designed forms are essential for efficiency and data entry accuracy.” - support.office.com Microsoft Access Create a form to conveniently add data to the table: • After setting up the table, close it then select the table you would like to create the form for first, then click Form. Close the form and save it with the appropriate prefix: frm. Microsoft Access Use the Design View and the Form Design Tools tabs to modify the appearance of the form. Microsoft Access Set the form to “Pop-Up” by adjusting properties in the property sheet task pane: Microsoft Access Try disabling the form Close Button (when you do this a form can be closed by right-clicking the top bar and selecting close):: Try disabling the ability to move the form: Set it to Auto Center. This will center the form in your Access window only (it doesn’t center the form on the screen): After you test these out return the settings back to normal. Microsoft Access After adjusting the form appearance and properties, go to Form View to add data to the table tblPerson. • Let’s add two fictitious records. • When you add data to the form it will automatically add the data to the table. Scroll through the records. You can make changes with the form. Microsoft Access Confirm that tblPerson has been successfully populated with data by viewing the table in data sheet view..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages26 Page
-
File Size-