• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Working with Access Databases... > Setting Default Values of Fields

Setting Default Values of Fields

Access 1.x assigned your fields' default values, such as 0 for Number and Currency fields and No for Yes/No fields. Access 2.0 did not assign default values to Number and Yes/No fields automatically. Access 95 and Access 97 cover the middle ground by assigning Number and Currency fields a default value of 0; all other field types are empty by default. (Notice that the tentative append record in (Figure 4.28) has zeroes entered in all the Number and Currency fields.) In all versions of Access, Text, Memo, and Date fields are empty by default. You can save data-entry time by establishing your own default values for fields; in some cases, Access 97's default values for Number and Currency fields may be inappropriate, and you'll need to change them. Table 4.9 lists the default values for the Personnel Actions table's fields.

Table 4.9. Default Field Values for the Personnel Actions Table
Field NameData ValueComments
paIDNo entry0 is not a valid Employee ID number, so you should remove Access's default.
paTypeQQuarterly performance reviews are the most common personnel action.
paInitiatedByNo entry0 is not a valid Employee ID number.
paScheduledDate=Date()This expression enters today's date from the computer system's clock.
paApprovedByNo entry0 is not a valid Employee ID.
paEffectiveDate=Date()+28This expression enters today's date plus 28 days.
paRatingNo entryIn many cases, a rating does not apply. A 0 rating is reserved for terminated employees.
paAmountNo entryIf a salary, bonus, or commission has no change, no entry should appear. 0 would indicate no salary, for example.
paCommentsNo changeFor now, Access's default is adequate.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint