Home

Database Date and Time Values

 

Fundamentals of Times

 

Introduction to Times

A time is a non-spatial measure of the number of seconds that have elapsed in a set period. Starting at a specified period and counting incrementally, if the number of seconds reaches 60, the measure is called a minute. If the number of minutes reaches 60, the measure is called an hour. If 24 measures of hours occur, the measure is called a day (actually a day is 24 hours plus a few more seconds but the seconds are taken into consideration only every 4 years).

Practical Learning: Introducing Time Values

  1. Start Microsoft Access
  2. To create a new database, click File Name and type Georgetown Dry Cleaning Services
  3. Click Create
  4. Right-click the Table1 tab and click Design View
  5. Set the name to Cleaning Orders and press Enter
  6. Replace ID with CleaningOrderID
  7. Click the empty box under CleaningOrderID and create the following fields:
     
    Field Name Data Type Field Size Format Default Value
    CleaningOrderID        
    Customer Name   50    
    Customer Phone   20    
    Unit Price Shirts Number Double Fixed 1.25
    Quantity Shirts Number Integer   0
    Unit Price Pants Number Double Fixed 1.95
    Quantity Pants Number Integer   0
    Other Item1   50   None
    Unit Price Item1 Number Double Fixed 0.00
    Quantity Item1 Number Integer   0
  8. In the top section of the table, set the Data Type of the Other Item1 field to Lookup Wizard...
  9. In the first page of the wizard, click the second radio button: I will type in the values that I want
  10. Click Next
  11. In the second page of the wizard, click the first empty field under Col1
  12. Create the following items
     
    None
    Tie
    Coat
    Dress
    Other
    Jacket
    Swede
    Silk Shirt
    Sweater
    Comforter
    Women Suit
    Regular Skirt
    Men's Suit 2Pc
    Men's Suit 3Pc
    Skirt With Hook
  13. Click Next
  14. Accept the column label as Other Item1 and click Finish
  15. Click the box on the left side of Other Item1
  16. Press and hold Shift
  17. Click the box on the left side of Quantity Item1
  18. Press Ctrl + C to copy
  19. Click the first empty box under Quantity Item1
  20. Press Ctrl + V to paste
  21. Change the field names to Other Item2, Unit Price Other2, and Quantity Item2 respectively
  22. Click the first empty box under Quantity Item2
  23. Press Ctrl + V to paste
  24. Change the new field names to Other Item3, Unit Price Other3, and Quantity Item3 respectively
  25. Click the first empty box under Quantity Item3
  26. Press Ctrl + V to paste
  27. Change the field names to Other Item4, Unit Price Other4, and Quantity Item4 respectively
  28. Click the first empty box under Quantity Item4 and create the following two fields:
     
    Field Name Data Type Field Size Format Default Value
    Tax Rate Number Double Percent 0.0775
    Notes Memo      
  29. Right-click the Notes field and click Insert Rows
  30. Set the name of the new field to Order Status and set its Data Type to Lookup Wizard
  31. In the first page of the wizard, click the second radio button: I will type in the values that I want
  32. Click Next
  33. In the second page of the wizard, click the first empty field under Col1
  34. Create the following items
     
    Not Ready
    Ready
    Picked Up
  35. Click Next
  36. Accept the column label and click Finish
  37. In the lower section of the table, set its Field Size to 20
  38. Set the Default Value to "Not Ready"
  39. Save the table
     
    Georgetown Cleaning Services - Cleaning Orders
  40. To change the view, on the Ribbon, click the Datasheet View button Datasheet View

Time Rules

By default, to display or handle time values in a database, Microsoft Access uses some letters and characters. The default rules are defined in the Regional and Language Settings of Control Panel:

Time Formats

To support time values, Microsoft Access uses a data type named Date. Actually, if you are creating a field in a table, to support a time value, you use a category of data type called Date/Time. You can specify the type in the Datasheet View or in the Design View of a table.

To create a time-based field in the Datasheet View of a table:

  • Click Click to Add and select Date & Time from the list
  • Click the cell under Click to Add. On the Ribbon, click Fields. In the Add & Delete section of the Ribbon, click Date & Time Date and Time

If you are creating the table in Design View, to configure a field that can hold time values, specify its Data Type as Date/Time:

Date and Time

In the Datasheet View, you can create a field that shows time values in a standard format. In the Datasheet View, to create a field that holds one of the time formats set in the Control Panel, click under Click to Add. On the Ribbon, click Fields. In the Add & Delete section, click More Fields and click either the Time am/pm, the Medium Time, or the Time 24hour option:

Time Formats

 

Practical Learning: Applying the Time Type to a Field

  1. On the table, click the cell under Customer Phone
  2. On the Ribbon, click Fields
  3. In the Add & Delete section, click Date & Time
  4. Type Time Deposited and press Enter
  5. On the table, click the cell under Order Status
  6. On the Ribbon, click Fields
  7. In the Add & Delete section, click More Fields and click Medium Time
  8. Type Time Picked Up as the name of the new field and press Enter
  9. To switch the view, right-click the tab and click Design View
  10. In the top section of the table, right-click Unit Price Shirts and click Insert Rows
  11. Type Time Ready as the name of the new column
  12. Set its Data Type to Date/Time

Time Formats

Microsoft Access allows you to customize how the time values would appear on the field. After creating a field, in the Datasheet View, click a cell under the column header. On the Ribbon, click Fields. In the Formatting section, select the desired option in the Format combo box as Long Time, Medium, or Short Time:

Time Formats

In the Design View, in the top section, click the name of the Date/Time field. In the lower section, click Format and select the desired option among Long Time, Medium, and Short Time:

Time Formats

As you can see, the Format property in the Design View provides two columns of information. The left column shows the names of time formats. The right column shows a preview of each option.

Practical Learning: Applying Time Formats

  1. While the Time Ready field is still selected in the top section, in the lower section of the table, click Format and click the arrow of its combo box. Select Short Time
  2. To change the view of the table, in the lower-right section of Microsoft Access, click the Datasheet View button
  3. When asked to save the table, click Yes
  4. On the table, click Time Deposited
  5. On the Ribbon, click Fields
  6.  In the Formatting section, click the arrow of the Format combo box and select Short Time

Time Masks

The Format property in the Design View is used to show how the time values should appear in the field. First, the user must enter the value. To assist the user with how to enter the time, you can create a custom mask. To do this, you can click Input Mask and type a mask. Otherwise, you can click the ellipsis button and follow the wizard.

As stated already, the rules that specify what characters and symbols are used to display time values are in the Time tab of the Customize Regional Options. The characters used for the hours, the minutes, and the seconds are defined in the Time Format combo box:

To control how time values should display in a field, after setting its Data Type to Date/Time, use the Format property. The characters used to create a format are:

Format Used For Used to Display
: Separator The character separator for time values
This character is set in the Regional (and Language) Settings of Control Panel 
h or H Hours An hour number from 0 to 23
If the hour is less than 10, it would display without the leading 0
hh or HH Hours An hour number from 0 to 23
If the hour is less than 10, it would display with the leading 0 such as 08
n or N Minutes A minute number from 0 to 59
If the number is less than 10, it would display without the leading 0
nn or NN Minutes A minute number from 0 to 59
If the number is less than 10, it would display with the leading 0 such as 06
s or S Seconds A second value from 0 to 59
If the number is less than 10, it would display without the leading 0
ss or SS Seconds A second value from 0 to 59
If the number is less than 10, it would display with the leading 0 such as 04
ttttt   The time using the formula of the Long Time of the Regional Settings of Control Panel
am/pm AM and PM am (in lowercase) if the time is configured to display in the standard (non military time) and if the time occurs in the morning, or pm (in lowercase) if the time is configured to display in the standard (non military time) and if the time occurs in the afternoon
AM/PM AM and PM AM (in uppercase) if the time is configured to display in the standard (non military time) and if the time occurs in the morning, or PM (in uppercase) if the time is configured to display in the standard (non military time) and if the time occurs in the afternoon
a/p AM and PM a (in lowercase) if the time is configured to display in the standard (non military time) and if the time occurs in the morning, or p (in lowercase) if the time is configured to display in the standard (non military time) and if the time occurs in the afternoon
A/P AM and PM A (in uppercase) if the time is configured to display in the standard (non military time) and if the time occurs in the morning, or P (in uppercase) if the time is configured to display in the standard (non military time) and if the time occurs in the afternoon
AMPM AM and PM The AM-PM character. Microsoft Access would refer to the format set in the Regional (and Language) Settings of Control Panel

When combining these characters to create a format, you should follow the rules of your language. You should refer to the formula set in the Time property page of the Regional (and Language) Settings of Control Panel. Microsoft Access also refers to it for the character separator. If you want to include any other character, type it in double-quotes.

To create a time value, you use an appropriate combination of the above letters and characters. In most cases, you should include the combination between two # signs. An example would be:

#05:42#

This would represent 5:42 AM. Another example is:

#10:26 AM#

This also represents a time in the morning. Remember that you can also include the seconds in your time value.

Operations on Time Values

 

Conversion to a Time Value

There are two main ways you start with a time value. You can provide it to an object or you can get it from your database. If you are providing it, you can use the rules and combinations we reviewed above. On the other hand, if a time value already exists in your database, you can retrieve and use it as you see fit. In most cases, the users know how to specify a time value. In some cases, when getting a time, it may not be in a correct or recognizable format. Normally, before involving a value in a time-based operation, you should first check and convert it to a recognizable format. To support this, you can called a function called CDate. Its syntax is:

CDate(Expression) As Time

This function takes one argument that can be passed as the name of a control, as a string that holds a time value, or as an expression that is supposed to produce a time value. If the value passed as argument holds a recognizable time, the function returns that time.

The Components of a Time Value

As mentioned in our introduction, a time value is made of the hours, the minutes, and the seconds. If you already have a time or if you retrieve one from an object or you get one from an expression, you may be interested in only one or its components. There are functions you can use to get these values.

To get the hour value of a time, you can call the Hour() function. Its syntax is:

Hour(Expression) As Integer

To get the minute value of a time, you can call the Minute() function. Its syntax is:

Minute(Expression) As Integer

To get the second value of a time, you can call the Second() function. Its syntax is:

Second(Expression) As Integer

Each of these functions takes an argument that can be an expression that should produce a time value. The argument can also be the name of a control that holds a time value. The function then examines the argument and produces a number that represents the hour, the minute, or the second respectively.

The Current Time

Microsoft Access provides various functions to perform date and time related operations. These functions allow you to add times, find the difference between time values, or add constant values to time values.

To give you the current time, Microsoft Access provides a function called Time.

Practical Learning: Getting the Current Time

  1. To change the view of the table, in the lower-right section of Microsoft Access, click the Design View button
  2. In the top section, click Time Deposited
  3. In the lower section, click Default Value and type =Time()

Adding to a Time Value

One of the operations you can perform on a time consists of adding a value to it. To support this, you can use the DateAdd() function. To find a backward time, you can use the DateDiff() function.

The DateAdd() function is used to add an interval time value to a specific time. With it, you can add a number of seconds, minutes, or hours to another time. The syntax of the DateAdd() function is

DateAdd(Interval, Number, date) As Time

The Interval argument is required and it specifies the kind of value you want to add. This argument is passed as a string, thus enclosed between double quotes and can have one of the following values:

Interval Used To Get
s Second
n Minute
h Hour
w Numeric Weekday

The Number argument is required also. It specifies the number of units you want to add. If you set it as positive, its value will be added. If you want to subtract, make it negative.

The date argument is the date to which you want to add the number.

Subtraction From a time

The DateDiff() function is used to find the difference between two time values. It allows you to find the number of seconds, minutes, or hours when you supply two recognizable values. The DateDiff() function takes 5 arguments, 3 are required and 2 are optional.

The syntax of the function is

DateDiff(Interval, Time1, Time2, Option1, Option2) As Time

The Interval argument is required and it specifies the kind of value you want to subtract. This argument is passed as a string and can have one of the following values:

Interval Used To Get
s Second
n Minute
h Hour

Required also, the Time1 and Time2 arguments specify the time values that will be used when performing the operation.

Fundamentals of Dates

 

Introduction to Dates

A date is a non-spatial measure of the number of days that have occurred in a period. When a certain number of days, namely 28, 29, 30, or 31 (depending on some factors), the measure is called a month. When 12 months have occurred, the measure is called a year (after 10 years have occurred, the measure is called a decade but the decade is not used in calculations; after 100 years have occurred, the measure is called a century but the century is not used in calculations; after 1000 years have occurred, the measure is called a millennium but the millennium is not used in calculations).

Introduction to Date Rules

By default, to display date values in a database, Microsoft Access uses some letters and characters. As mentioned for times, the rules for dates are built in the operating system and you can check them in the Regional and Language Settings of Control Panel:

Customize Regional Options

As reviewed for the time, to support date values, Microsoft Access internally uses a data type named Date. In a table, this data type is referred to as Date/Time. Over all, dates and times are considered differently but, to specify that a field would use date, time, or both, set its Data Type to Date/Time. You can specify this data type for a field what creating a table either in the Datasheet View or in the Design View.

To create a field that receives or displays date values, in the Datasheet View of a table:

  • Click Click to Add and select Date & Time from the list
  • Click the cell under Click to Add. On the Ribbon, click Fields. In the Add & Delete section of the Ribbon, click Date & Time Date and Time

If you are creating the table in Design View, to configure a field that can use date values, specify its Data Type as Date/Time.

As stated already, the Control Panel provides some standard formats for date values. To create a field that uses one of them, while a table is displaying in the Datasheet View, click under Click to Add. On the Ribbon, click Fields. In the Add & Delete section, click More Fields. In the Date and Time section, click either Short Date, Medium Date or Long Date.

Practical Learning: Applying a Date Type

  1. In the top section of the table, right-click Time Deposited and click Insert Rows
  2. Type Date Deposited as the name of the new field
  3. Set its Data Type to Date/Time
  4. To change the view, right-click the Cleaning Orders tab and click Datasheet View
  5. When asked to save the table, click Yes
  6. On the Table, click under Time Deposited
  7. On the Ribbon, click Fields
  8. In the Add & Delete section, click Date & Time
  9. Type Date Ready as the name of the new field and press Enter

Dates Formats

After a valid date value has been entered in a field, you can specify how the date would display, not necessarily how the date was entered:

  • If you are working in the Datasheet View, after creating a Date/Time field, click a cell under that column header. On the Ribbon, click Fields. In the Formatting section, select the desired option in the Format combo box as General Date, Long Date, or Short Date
  • If you are working in the Design View, in the top section, click the name of the field. In the lower part, click the Format combo box and select General Date, Long Date, Medium Date, or Short Date

Those are the most popular formats used for dates. If none of those satisfies you, you can use the following characters or symbols to create a desired format:

Format Used For Used to Display
d Days The day as a number from 1 to 31
dd Days The day as a number with a leading 0 if the number is less than 10
ddd Weekdays The name of a weekday with 3 letters such as Mon, Tue, etc
dddd Weekdays The complete name of a week day such as Monday, etc
w Week The numeric day of the week such as 1
ww Week The numeric week of the year, ranging from 1 to 53
m Months The numeric month from 1 to 12
mm Months The numeric month with a leading 0 if the number is less than 10
mmm Months The short name of the month such as Jan, Feb, Mar, etc
mmmm Months The complete name of the month such as January, February, etc
q Quarters The numeric quarter of the year
yy Years Two digits for the year as 00 for 2000 or 03 for 2003
yyyy Years The numeric year with 4 digits

To use these letters, simply type the desired combination in the Format field. Here is an example:

Date Time

This is configured to display a single digit for a day of the month if the day is less than 10, followed by the complete name of the month, followed by the year in 4 digits.

During data entry, the data entry person can enter a valid date. Once the field looses focus, it displays the date based on the format. Based on this, you can use any combination of formats but you should use a combination most regularly used in your language so the users would not be confused.

Besides the indicated characters, you may want to use some other characters to separate them. An example would be January 5, 2004, which uses a comma in the display. To create such sections, include the characters in double-quotes. What you would be doing is to ask Microsoft Access to display such characters "as is" while considering the non-quotes characters as part of the format. Here is an example:

Date Format

Practical Learning: Applying a Date Format

  1. On the table, click Date Deposited
  2. On the Ribbon, click Fields
  3. In the Formatting section, click the arrow of the Format combo box and select Long Date
  4. To change the view, right-click the Cleaning Orders tab and click Design View
  5. In the top section, right-click Time Picked Up and click Insert Rows
  6. Set its name to Date Picked Up and set its Data Type to Date/Time
  7. In the lower section, click the arrow of the Format combo box and select Long Date

Dates Masks

In the Design View of a table, the Format property allows you to specify how a date would display in a field but not how the user must enter it. To specify how the date must be typed in a field or control, you can use the Input Mask property. You can either type the mask or you can click the ellipsis button and follow the wizard. If you want to type your mask, you can use an appropriate combination of the letters and symbols we saw above.

 
   
 

Operations on Date Values

 

The Components of a Date

As mentioned for the time, before involving a value or an expression in a date-based operation, you should first convert it. To support this operation, you can call the CDate() function.

We saw that a date was made of the days, the months, and the years components. On an existing date, you can get these values by calling their corresponding functions. To get the year part of a date, you can call the Year() function whose syntax is:

Year(Expression) As Integer

This function takes an argument that represents a date value. It then isolates the year that it returns as a number.

To get the month of a date, you can call the Month() function whose syntax is:

Month(Expression) As Integer

The function considers a date value as argument, gets its year, and returns it.

The Week in a Date

The week is a combination of 7 days that consecutively occur in a date. To identify them, each day has a specific index and a specific name. In US English, the names of the days are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday. In some cases, the days may be counted from Sunday (instead of Monday). The option to specify what is considered as the first day of the week is referred to as firstdayofweek and is represented in Microsoft Access by one of the following values:

Value Name
0 National Language Support (NLS) Setting
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday
7 Saturday

In most operations that involve date values, you will consider that the first day of the week is Sunday, represented with 1. In some cases, if you want to use another day as the starting point of a week, you can specify it from one of the above values.

To get the name of a week, you can use the WeekdayName() function whose syntax is:

WeekdayName(weekday As Integer,
	    Option As Boolean,
	    Optional firstdayofweek As Integer) As String

This function takes three arguments with only the first required. The first argument is passed as an integer and can be one of the above. The second argument is optional and it specifies whether the weekday name will be abbreviated. The third argument, firstdayofweek, also optional, specifies what day should be considered as the first day of the week. It can be one of the above numbers.

To get the index position of a day of a week from a date value, you can call the Weekday() function. Its syntax is:

Weekday(Expression, Optional firstdayofweek As Integer) as Integer

The first argument is required. It can be an expression or a control that must produce a date. If the function succeeds, it produces a number that represents the day of the week. 

The Current Date

As opposed to the time, if you want to know the current date on a computer, you can call a function named Date. To get both the current date and the current time of the computer, you can call a function named Now.

Practical Learning: Getting the Current Date

  1. In the top section of the table, click Date Deposited
  2. In the lower section, click Default Value and type =Date()
     
  3. Save and close the table
  4. On the Ribbon, click Create
  5. In the Forms section, click Form Design
  6. Right-click the form and click Form Header/Footer
  7. Right-click the form's tab and click Save
  8. Set the name to Cleaning Orders and press Enter
  9. Double-click the button at the intersection of rullers
  10. In the Property Sheet, click All and change the following characteristics:
    Record Source: Cleaning Orders
    Caption: Georgetown Dry Cleaning Services - Cleaning Orders
    Dividing Lines: Yes
  11. In the Tools section, click Add Existing Fields
  12. Design the form as follows:
     
    Georgetown Dry Cleaning Services
     
    The names and control sources of the sub-total text boxes are:
     
    Name Record Source
    txtSubTotalShirts =Nz([Unit Price Shirts])*Nz([Quantity Shirts])
    txtSubTotalPants =Nz([Unit Price Pants])*Nz([Quantity Pants])
    txtSubTotalItem1 =Nz([Unit Price Item1])*Nz([Quantity Item1])
    txtSubTotalItem2 =Nz([Unit Price Item2])*Nz([Quantity Item2])
    txtSubTotalItem3 =Nz([Unit Price Item3])*Nz([Quantity Item3])
    txtSubTotalItem4 =Nz([Unit Price Item4])*Nz([Quantity Item4])
     
    The name of the Cleaning Total text box is: txtCleaningTotal
    The control source of the Cleaning Total text box is: = Nz([txtSubTotalShirts]) + Nz([txtSubTotalPants]) + Nz([txtSubTotalItem1]) + Nz([txtSubTotalItem2]) + Nz([txtSubTotalItem3]) + Nz([txtSubTotalItem4])
    The name of the Tax Amount text box is txtTaxAmount
    The control source of the Tax Amount text box is: =CLng(CDbl(Nz([txtCleaningTotal])) * CDbl(Nz([Tax Rate])) * 100) / 100
    The name of the Net Price text box is: txtNetPrice
    The control source of the Net Price text box is: =Nz([txtCleaningTotal]) + Nz([txtTaxAmount])
  13. Preview the form
     
    Georgetown Dry Cleaning Services
  14. Save and close the form

Adding to a Date Value

Some of the operations performed on date values are also performed using either the DateAdd() or the DateDiff() functions.

The DateAdd() function is used to add an interval date value to a specified date. It is used to add a number of days, weeks, months, or years to another date. The syntax of the DateAdd() function is

DateAdd(Interval, Number, date) As Date

The Interval argument is required and it specifies the kind of value needed as a result. This argument can be passed as a string in double-quotes and can have one of the following values:

Interval Used To Get
w Numeric Weekday
ww Week of the Year
d Day
y Numeric Day of the Year
m Month
q Quarter
yyyy Year

The Number argument is required also. It specifies the number of units you want to add. If you set it as positive, its value will be added. If you want to subtract, pass it as a negative value.

The date argument is the date to which you want to add the number.

Subtraction From a Date

The DateDiff() function is used to find the difference between two date values. It allows you to find the number of days, weeks, months, or years from two date values. The DateDiff() function takes 5 arguments, 3 are required and 2 are optional. Its syntax is:

DateDiff(Interval, Date1, Date2, Option1, Option2)

The Interval argument is required and it specifies the kind of value you want as a result. This argument is passed as a string and can have one of the following values:

Interval Used To Get
w Numeric Weekday
ww Week of the Year
d Day
y Numeric Day of the Year
m Month
q Quarter
yyyy Year

The Date1 and Date2 arguments are required. They specify the date values for the operation.

By default, the days of a week are counted starting on Sunday. If you want to start counting from another day, pass the Option1 argument using one of the following values: 1, 2, 3, 4, 5, 6, 7. There are other variances to that argument.

If your calculation involves weeks or finding the number of weeks, by default, the weeks are counted starting January 1st. If you want to count your weeks starting at a different date, use the Option2 argument to specify where the program should start.

Lesson Summary

 

Exercises

 

Yugo National Bank

  1. Open the Yugo National Bank1 database
  2. Open the Employees form and set the Can Create New Account field as follows for the following employees:

    Last Name Can Create New Account?
    Yuen Checked
    Marconi Checked
    Young Checked
    Holland Checked
    Kast Checked
    Lourde Checked
    Kirkland Checked
  3. Close the form

Yugo National Bank

  1. Open the Yugo National Bank
  2. Open the ChargeReasons Table in Design View
  3. Add one more field named Description and set its Data Type to Memo
  4. Change the captions of the first two fields as following:
     
    Field Name Field Size Caption
    ChargeReasonID   Charge Reason ID
    ChargeReason 50 Charge Reason
    Description    

    Save and close the table

  5. Create a form based on the ChargeReasons table and save it as ChargeReasons. Design it to appear like the other already created forms:
     
  6. Switch the ChargeReasons form to Form View and create the following records
     
    Charge Reason ID Charge Reason Description
    1 Monthly Charge Applied every month to each accounts
    2 Overdraft Applied if a customer's account remains negative for 72 hours

    Close the form

Watts A loan

  1. Open the Watts A Loan1 database
  2. Open the Transactions table in Design View and change it as follows:
     
    Field Name Data Type Field Size Caption
    TransactionID AutoNumber   Transaction ID
    TransactionNumber Number Integer Transaction Number
    TransactionDate Date/Time   Transaction Date
    TransactionAmount Number Double, Fixed Transaction Amount
    Notes Memo    
  3. Save and close the table
  4. Open the Customers table in Design View and change it as follows:
     
    Field Name Data Type Field Size Caption
    CustomerID AutoNumber   Customer ID
    AccountDate Date/Time   Account Date
    AccountNumber Text 20 Account Number
    FirstName Text 50 First Name
    MiddleName Text 50 Middle Name
    LastName Text 50 Last Name
    Address Text 100  
    City Text 50  
    State Text 50  
    ZIPCode Text 20 ZIP Code
    Country Text 50  
    HomePhone Text 40 Home Phone
    WorkPhone Text 40 Work Phone
    EmailAddress Text 60 Email Address
    Notes Memo    
  5. Save and close the table
  6. Create a form for the Customers table. Save the form as Customers and design it as you see fit. Here is an example:
     
    Customers
  7. Close the form
  8. Open the Customers form and create its records

World Statistics

  1. Open the World Statistics1 database
  2. Open the Countries table in Design View and complete it as follows:
     
    Field Name Data Type Field Size Caption
    CountryID      
    CommonName      
    InternetCode      
    LongName      
    GovernmentType      
    Area Number    
    Population Number    
    Nationality Text 50  
    Capital Text 50  
    Independence Date/Time    
    NationalHoliday Date/Time   National Holiday
    Map OLE Object    
    Flag OLE Object    
    Pictures Attachment    
    WebSite      
    Description Memo    
  3. Save and close the table
  4. Create a form for the Countries table and save it as Countries
  5. Design it as you see fit. Here is an example:
     
     
  6. Using (legitimate and official) information you can find in books or web sites, perform data entry using the Countries form. You can use, but do not have to limit yourself to, the CIA World Fact Book web site. Any information you can find somewhere else such as the presidency web site of a country, or the official web sites of a country, is fine

US Senate

  1. Open the US Senate1 database 
  2. Go to http://www.senate.gov
  3. Get the information about each senator and populate the Senators form with that information
 
 
   
 

Previous Copyright © 2010-2012 FunctionX Next