Базы данныхИнтернетКомпьютерыОперационные системыПрограммированиеСетиСвязьРазное
Поиск по сайту:
Подпишись на рассылку:

Назад в раздел

Ch 1 -- Database Essentials

Microsoft® Access 97 Quick Reference

- 1 -
Database Essentials

There are several fundamental tasks in Access 97 that you will use frequently. In this section, you can quickly reference essential Access operations for entering text, numbers, and dates and times; as well as special features that speed data entry, such as AutoCorrect. You'll discover how to quickly obtain the Help you need while using Access. For example, you can explore tasks for using the new Office Assistant to provide detailed assistance as you complete a task.

This section also explains how to find data, navigate in the Access objects and in dialog boxes, and select data. In addition, you'll find tasks that explain how to use Undo and Spell Check, and start and exit Access.

Correct Mistakes: AutoCorrect

Access 97 has a feature called AutoCorrect that can automatically correct your mistakes and reduce your typing time. Use AutoCorrect to correct typing errors, correct two capital letters in a row, correct the accidental use of Caps Lock, capitalize names of days, capitalize the first letters following a period and a space character (defined as a sentence), and correct text you type (such as replacing misspelled words). If you have used Word 97 or other Office 97 products, AutoCorrect might be familiar to you.

AutoCorrect only works when you are adding data to a table, query, or form. It does not work in Design View of any object, nor while you are programming.

Steps

1. Choose Tools, AutoCorrect.

2. To correct that nagging word you always spell wrong or to expand an abbreviation of text you continuously type, enter the incorrect word or abbreviation in the Replace text box and the correction in the With text box.

3. Check other options such as Correct Two Initial Caps, Capitalize First Letter of Sentence, Capitalize Names of Days, and Correct Accidental Use of Caps Lock Key.

4. If you have any exceptions to the first letter and two initial caps, choose the Exceptions button and enter them on the correct tabs. Choose OK to return to the AutoCorrect dialog box and then OK again to finish.

When you type an AutoText, Access will automatically convert the entry to whatever you added in the With text box in Step 2.


NOTE: Access shares the AutoCorrect entries with the other applications in Microsoft Office. If you add entries in Access, the same entries will be available in Word, Excel, and PowerPoint. If you do not want a form's text field to use AutoCorrect, go to Design View, double click the text control, and change the Allow AutoCorrect property to No.

Correct Mistakes: Undo

You can use the Undo command (Ctrl+Z) on the Edit menu or the Undo button on the toolbar to remove your most recent change.

Steps

1. To remove edits to a record you have saved, click the Undo button on the toolbar.

If you begin editing another record or use a filter, Undo Saved Record or the Undo command will not be available to you.

Data: Copy

Access can cut, copy, and paste data from a datasheet or a form through the Windows Clipboard. Only one selection can be manipulated at a time, but a selection can include one piece of data or several pieces of data. All data types are supported.

When you copy a selection, the data is copied to the Clipboard and the original data is left intact. If you want to copy entire records, see "Records: Copy."


NOTE: This procedure works in all views of Access. If you are unable to use the toolbar for some reason (for example, if you are in a dialog box), press Ctrl+C to copy and Ctrl+V to paste.

Steps

1. Highlight the data you want to copy.

2. Click the Copy button on the toolbar.

3. Move to the desired location and click the Paste button on the toolbar.


TIP: If you want to copy the value from the same field in the previous record, press Ctrl+' (apostrophe). You can be in Form or Datasheet View.

Data: Edit

Access offers you several different methods for editing data: one field at a time, several fields at a time, one record, or many records at a time. The simplest method for editing data is to edit the data in a field of a datasheet, or a form in Form View. To edit multiple records at one time, see "Action Query: Update Query" in the Query and Filters part of this book.

Steps

1. Open a datasheet or a form in Form View.

2. Position the insertion point in the field you want to modify or, if desired, select the portion of text you want to replace.

3. Enter the new or replacement text.


TIP: Some field types will display a plus pointer when you move the cursor to the leftmost part of the field. If you click at that point, you select the entire field.

You will see a triangle in the record selector when a record is current (in a datasheet) or a pencil icon when you are editing the record.

When you enter or edit data in a multiuser situation, Access might lock the record that is being edited by another user. Other users can view the data, but cannot edit that data. A locked record displays a circle with a slash (lock symbol) in the record selector. A locked record cannot be edited until the lock is released. Locks are released when the data is saved or when the user with the lock moves off that record. (See also "Record Locks" in the Special Features and Programming part of this book.)

Data: Enter

Entering data in datasheets or forms is similar to entering data in an Excel worksheet or Word table.

Steps

1. Open the form or datasheet and go to the desired record. If you want a new record, click the New Record button on the toolbar.

2. Type your entry. If the entry is an OLE object, either paste the data from another source or choose Insert, Object and choose the object type and object from the dialog boxes. If the entry is a lookup, select from the drop-down arrow. If the entry is a hyperlink, you can type or use the Insert Hyperlink button on the toolbar.

3. Tab to go to the next field. Repeat Step 2, tabbing to each field. If you need to go to the previous field, press Shift+Tab.

When you reach the last field on the record, Tab will place you on the first field of the next record.

For entering specific data types, see also "Dates and Times: Enter," "Hyperlinks: Enter," and "OLE Objects: Enter."


NOTE: When you work on a form, the Tab Order settings will determine the sequence of fields you move to when you press Tab or Enter. The Tab Order does not have to be the same order as the fields appear on the form. (See "Forms: Tab Order" in the Forms and Reports part of the book.)

Data: Find

There are several ways of locating data in Microsoft Access. If you are interested in locating data in groups of records, then you should apply a filter or a query to your data set. (See "Filter Data" and "Query: Run" in the Queries and Filters part of the book.) For locating a particular value one occurrence at a time, you can use the Find dialog box. If you need to find and replace data, see "Data: Replace."

Steps

1. Open a table, query, or form, and position the insertion point in the field you want to search (optional).

2. Click the Find button on the toolbar.

3. Enter the string or value you want to search for in the Find What text box. If you want to enter only a portion of the string, use asterisks such as jon* for entries beginning with jon or *jon* for jon anywhere in the field.

4. Choose Find First to go to the first match; then Find Next to go to the next match. Choose Close when you are finished with your search.


NOTE: While you are in the Find dialog box, you have options such as the search direction, whether you want to search for a portion of text or the whole field, match case, search dates as you type them (as formatted), and whether to search all fields or the current field.

Data: Replace

You can use the Replace command to find and replace all or some of the occurrences of a particular value for an entire field or a portion of a field. You can use the Datasheet or Form View for this purpose. You can also use an update query to replace an entire field with alternative values. (See "Action Query: Update Query" in the Queries and Filters part of the book.")

In the Replace dialog box, you specify the value or string that will replace your match. You can use the Replace All button to perform a single replacement for all matches or you can replace values one at a time using the Find Next and then the Replace buttons in sequence.


NOTE: If you want to find and replace Nulls or zero length strings, you have to manually enter the replacement values directly in the records rather then use the Replace dialog box.

Steps

1. Open a table, query, or form in Datasheet or Form View and click in the field you want to work with.

2. Choose Edit, Replace.

3. Enter the value to find in the Find What text box and the value used to replace it in the Rep lace With text box.

4. Choose the Find Next button followed by the Replace button to replace the next occurrence.

5. Or, choose the Replace All button to replace all matches. Choose Close when you are done.

Data: Select

You can select fields in a datasheet in many different ways, using your mouse, menu commands, or the keyboard.

Steps

1. Open a table, query, or form in Datasheet View.

2. Click and drag on the data of interest, or click in a field and press F2 to select an entire field's value. See the following table for additional selection techniques.

3. Click a column header to select all field data, or click a row selector to select all the data in a record. Extend your selection by pressing the Shift key and clicking at the end of your new selection range.

4. Click the All Records selector to the left of the leftmost column header to select all the data in your datasheet.

Datasheet Selection Techniques

To Select this Do this
Field data Click and drag a selection, then release the mouse.
To extend a field selection Hold the Shift key and click at the end of the new selection range.
An entire field Move the pointer to the left edge of the field. When you see a plus sign cursor, click there.
An entire field With the insertion point in that field, press F2.
Adjacent fields Drag the left edge of the current field to extend range of selection.
Adjacent fields With a field selected, hold down the Shift key and press the appropriate arrow key.
A column Click the column header.
The current column Press Ctrl+Spacebar.
Adjacent columns Click the column header and drag over additional column headers to extend the range of selection.
A record Click the record selector to the left of the row.
Multiple records Click a record selector then drag down over additional record selectors.
Multiple records Press Shift+Spacebar, and then Shift+Up arrow or Shift+Down arrow.
All records Choose Edit, All Records, or click the All Records selector to the left of the leftmost column header.

Data: Sort

You can sort by the values in a field or by the values in two or more fields. If you use more than one sort field, the primary sort key is always fully sorted. Sorts can be either ascending or descending, and can be performed at any time. When you use the sort buttons, a temporary filter is created. For more control over sorts, you can use one of the filter procedures in the Queries and Filters part of this book or you can create your own query. (See "Filter Data" and "Query: Create with Design View.")

Steps

1. Click the Sort Ascending or Sort Descending button on the toolbar to sort by the current field, or on a group of selected fields (columns).

2. To change the sort order, click and drag the first sort field (column) to the left, select multiple columns, and again click one of the sort buttons.
The leftmost selected sorted column is the primary sort key.

Choose Records, Remove Filter/Sort to remove a filter and sort and return your records to their natural order (as well as view your entire set).

Database Open

Access enables you to open one database at a time. If you have a database open in view and you open another database, Access closes the first one and opens a new one (in other words, you do not have to close one database to open another).

Steps

1. Choose File, Open. If you are in the Database window, click the Open Database button on the Database toolbar.

2. Locate the database file in the Open dialog box and choose the Open button.

Like other applications within Microsoft Office, Access also enables you to choose from one of the last few files open on the bottom of the File menu.


NOTE: If you want to bypass your startup options (such as opening a form or disabling toolbars), hold down Shift when you choose the Open button. If you are in a multiuser environment and need to open the database so no one else has access while you are developing or editing, check Exclusive on the Open dialog box.

Database Window: View Objects

The Database Window is the control center and container for all tables, queries, forms, reports, macros, and modules. Unlike other database applications, all objects (tables, reports, forms) are in one file rather than separate files on a hard disk.

Steps

1. To bring up the Database window while another window is displayed, press F11.

2. To see descriptions and dates modified and created in addition to object names, click the Details button on the toolbar.

3. To open an object (table, query, form, report), click the tab of the object type and then double-click the name in the Database window.

While you are in the Database window you can copy, delete, or rename the objects. (See the tasks "Database Object: Copy," "Database Object: Delete," and "Database Object: Rename" within the File Management part of the book.)

Dates and Times: Enter

Entering dates and times is generally like entering any other data (see "Data: Enter") with a couple of shortcuts. When the field is formatted (see "Data: Format" in the Table and Database Design part of this book) you might enter data one way (for example, 10-5-97) but it appears in the field as a different format (for example, 10/5/97).

Steps

1. Open the table, form, or query and move to the field in which you want to enter the data.

2. To enter today's date, press Ctrl+; (semicolon). To enter the time, press Ctrl+: (colon). If you want to enter a date in this year you can leave off the year and enter the month and day (for example, 3/17). After you leave the field, the date or time will format according to the format property for the field.

3. If you want new records to default to the current date or time, choose the Design button. Go to the field's Default value in a table or right-click the control in a form, choose Properties and go to Default value. Type in Date() for current date or Now() for either current date or time (depending on format). Return to the Datasheet or Form View.


NOTE: Entering the current date and time depends on your system clock being set correctly. If you need to reset your clock, right-click the time on the far right of your taskbar and choose Adjust Date/Time.

There are special considerations while working with dates in queries and filters. (See "Criteria: Dates" in the Queries and Filters part of this book.)

Exit Access

Unlike other programs such as Word or Excel, you do not need to save changes after you edit a record. You save changes automatically by moving to a different record on a datasheet or a form. However, when you are editing or creating a design of an object, you will be prompted to save changes when you close Access.

Steps

1. Click the Close (X) button on the top right of the Access window.

2. If you are in design mode for any object, choose whether you want to save changes to the object.


CAUTION: Do not turn the power off before exiting Access. You could damage your database. If you need to repair a damaged database, there is a repair procedure that might (or might not) work. (See "Database Repair" tasks in the File Management part of this book.)

Freeze Display of a Table Field

If you have a wide table that is wider than your screen, it might be difficult to identify which record you are in when you scroll to the right. You can freeze one or more identifying fields so they stay on the left side of your screen.

Steps

1. Open a table, query, or form in Datasheet View.

2. Use the black down arrow mouse pointer on the column headers to select one or more adjacent columns.

3. Choose Format, Freeze Columns.

To undo the frozen columns, choose Format, Unfreeze All Columns.

Help: Context Sensitive

Microsoft Access contains several different types of help, with different amounts of information. You will find access to various help methods on the Help menu or you can use the What's This? button on the right of a window's title bar.

Steps

1. Press F1.

Access opens Office Assistant or displays help on the topic it most closely associates with your current condition or position in the program. If Access goes directly to the topic, when you finish reading the help, go directly to Step 4.

2. If the Assistant opens, type a question and then press Enter.

3. The Assistant gives you a list of possible options that it thinks you might want help on. Click one of the topics.

4. When finished with the help window, click the Close (X) button. If you want to close the Assistant, click its Close (X) button as well.

The Microsoft on the Web command lists a variety of resources on the Internet related to Microsoft Access. If you select one of the commands on this submenu, Windows opens your browser and attempts to locate this Web page. In order for the Web page to be loaded, you must have an active connection to the Internet; otherwise, the page won't be found.

Help: Dialog Boxes

Dialog boxes include a question mark in the title bar (beside the Close button) that enables you to obtain Help information on the options and buttons displayed in the dialog box.

Steps

1. To get more information on a button or option in a dialog box, click the Question Mark (?) button in the dialog box title bar. (If the ? button is not visible, press Shift+F1.)

2. Click the area of the dialog box for which you need Help. A pop-up box appears to explain how to use the button.

3. Click the pop-up box to remove it from the screen.

Help: Help Contents and Index

Access provides an extensive online Help system to get you up to speed on database tasks. At any point, you can access Help to provide assistance, display definitions of common features, and access tips you can use to perform a task more quickly. The Help Contents and Index feature enables you to find detailed Help information on a specific topic.

Steps

1. Choose Help, Contents and Index; then click the Contents tab.

2. Double-click the desired category.

3. Click the topic you want; then choose Display.

4. View the Help information; then click the Close button when you are done.


TIP: Use the Index tab in the Help Topics dialog box if you want to look up specific words that are listed in an index format. Click the Index tab and begin typing the word you are searching for. Then, click the desired index entry in the list box and choose Display.

Help: Office Assistant

The Office Assistant, a new feature included with Access and other Microsoft Office applications, provides tips, Help information, and interprets what Help you might need based on your current actions. The Office Assistant is an on-screen, interactive program that can be customized to provide help as you work in Access.

If you are experienced in Access and find the Office Assistant to be somewhat bothersome, you can temporarily close the Office Assistant to remove it from the screen. You also can customize options that specify when the Office Assistant should appear.

Steps

1. Click the Office Assistant. (If the Office Assistant doesn't already appear on-screen, click the Office Assistant button on the toolbar.)

2. In the text box, type the question or topic for which you want Help; then choose the Search button.

3. If a list of subtopics appears, click the topic that most closely matches the procedure for which you want Help. A Help window appears.

4. View the Help information; then click the Close button when you are done.

You might decide that you want to hide the Office Assistant and display it only when you need it. To hide the Office Assistant, click the Close (X) button on the Office Assistant. Click the Office Assistant button in the toolbar to redisplay the Office Assistant.

To customize how the Office Assistant works, right-click the Office Assistant and choose Options. Select the options you want to use; then choose OK.


TIP: When a light bulb appears in the Office Assistant, click it to display a tip related to what you are doing.


TIP: To change the look of your assistant, right-click the Office Assistant and select Choose Assistant. In the Gallery tab, use the Next and Back buttons to scroll through the different assistants. When you see the assistant you want to use, choose OK.

Help: Print Help Information

You can print most of Access's online Help information for easy reference when you are working with Access. (See "Help: Help Contents and Index," "Help: Searching for Topics," or "Help: Office Assistant" before you complete this task.)

Steps

1. Choose Help, Contents and Index; then click either the Contents, Index, or Find tab. Or, click the Office Assistant and type your question.

2. Navigate to the Help window you want to see.

3. In the Help window, choose the Options button; then click Print Topic.

4. Make any desired changes in the Print dialog box; then choose OK to begin printing.

5. Click the Close button in the Help window when you are done.

Help: Search for Topics

When you're not sure where to find a Help screen on a certain topic, you can use the Find tab to search for Help using specific keywords and then choose from a list of selections. You can also use the Office Assistant to search for help topics. (See "Help: Office Assistant.")

Steps

1. Choose Help, Contents and Index; then click the Find tab.

2. In the text box, type a word that you want to find.

3. In the middle list box, select a word or phrase to narrow your search.

4. In the bottom list box, select the topic you want; then choose Display.

5. View the Help information; then click the Close button when you are finished.


NOTE: The first time you use Find, Access builds a word list of Access terms. This might take a few minutes.

Help: Tip of the Day

The Tip of the Day feature provides an easy way to familiarize yourself with some of Access's capabilities. When this feature is enabled, a tip on using Access appears each time you start Access. To see additional tips while you are using Access, you can access the Office Assistant and click the Tips option. (See also "Help: Office Assistant.")

Steps

1. Click the Office Assistant. (If the Office Assistant doesn't already appear on-screen, click the Office Assistant button in the toolbar.)

2. Choose Options.

3. In the Options tab, click the Show the Tip of the Day at Startup check box; then choose OK.

If you don't want the tip of the day to show, repeat Steps 1-3 and uncheck the Show the Tip of the Day at Startup check box.


TIP: If you see a light bulb displayed in the Office Assistant, click it to see a helpful tip on your current actions.

Help: Toolbar Buttons

Access provides ScreenTips to help you remember the names and functions of the toolbar buttons. ScreenTips are the small pop-up labels that appear next to a toolbar button when you move the mouse pointer onto the button and pause.

Steps

1. To find more information on a toolbar button (in addition to the ScreenTip), press Shift+F1.

2. Click the toolbar button for which you need Help. A pop-up box appears to explain what you use the button for.

3. Click the pop-up box to remove it from the screen.


TIP: To turn ScreenTips on or off, choose View, Toolbars, Customize; then click the Options tab, and clear or check the Show ScreenTips on Toolbars check box. Click Close. You can also have ScreenTips show shortcut keys by choosing Show Shortcut Keys in ScreenTips.

Hyperlinks: Copy

A hyperlink field stores a description of an address as either an URL (Uniform Resource Locator) for a Web address or UNC (Universal Naming Convention) for an intranet address of a document. The actual address is stored internally, with a description that is browsed by others. The procedure describes how to copy a hyperlink from any Office application to your database.

Steps

1. Right-click a hyperlink.

2. Choose Hyperlink, Copy Hyperlink command on the shortcut menu to copy it to the Clipboard.

3. Move to another hyperlink field on a table, query, or form and click the Paste button.

Hyperlinks: Enter

You can enter hyperlinks to Web sites or to documents on your computer or your network. Your table contains the hyperlink description as underlined text. When you click that link, you open your browser or the appropriate application and bring that document into view. You must first create a hyperlink field before you can enter a hyperlink. (See "Hyperlinks: Create Field" in the Table and Database Design part of this book.)

Steps

1. Open a table, query, or form in Datasheet or Form View.

2. Move the insertion point into the Hyperlink field.

3. Enter the text you want to display for the hyperlink if you want to provide an explanation of the underlying address.

4. Click the Insert Hyperlink button on the toolbar. Enter the UNC path (path and filename) or URL address (web address) into the Link To File or URL text box.

5. If desired, enter the location in the Named Location in File (Optional) text box; then choose OK.


NOTE: To enter a hyperlink based on the location of the current file, and not on an absolute path, check the Use Relative Path for Hyperlink check box. If you do not know the location of your document, choose the browse button on the Insert Hyperlink dialog box.

Hyperlinks: Modify

If you want to edit a hyperlink, you will run into a problem when you click the hyperlink because that activates the hyperlink. Instead you need to use the right mouse button or press Tab to enter the field for editing.

Steps

1. Click the field before the hyperlink and press Tab to enter the hyperlinked field.

2. If desired, type the new description for the hyperlink.

3. Right-click the hyperlink field and choose Hyperlink, Edit Hyperlink command on the shortcut menu to enter the Edit Hyperlink dialog box. Enter the UNC path or URL address into the Link To File or URL text box.

4. Optionally, enter the location in the Named Location in File text box; then choose OK.

Navigate in a Datasheet

Navigating a datasheet uses techniques that are very similar to navigating most spreadsheets. You can move through columns (fields) and rows (records) using standard keystrokes. If you need to find data you can also use the Find button. (See "Data: Find.")

Steps

1. Double-click a table name in the Tables tab of the Database window to open its datasheet.

2. Press the Tab key to move to the right; the Shift+Tab key to move to the left; or use the arrow cursor keys to move in any direction.

When you move past the furthest right field you move to the next record; and when you move before the first field you move to the previous record. See the following table for additional navigation information.

Datasheet View Navigation

To Navigate in Datasheet View Do the Following
To advance a field to the right Press Tab.
To move a field to the left Press Shift+Tab.
To advance to the next record Press the Tab key on the last field in a record.
To go back to the rightmost field in the previous record Press Shift+Tab in the leftmost field of the current record.
To move to the first record in the Navigation selector Click First Record button
To move to the previous record Click Previous Record.
To move to the next record Click Next Record.
To move to the last record Click Last Record.
To move to the first blank record Click New Record buttonon toolbar.
To move to a particular record Double-click the Record Number text box, enter a record number, then press Enter.


If all else fails, you can always navigate by clicking an insertion point on any record or field in view. Move the scroll bars to view other records and click in any record or field of interest.


TIP: You might want to set some of the options on the Keyboard tab of the Options dialog box to change the behavior of the arrow and Enter keys during record navigation. Select Tools, Options and click the Keyboard tab to change options. The options include: whether Enter moves to the next field or record; whether the arrow key moves to the next field or character; whether a field is selected when you enter; and whether you can press Tab or Enter to go to the next record, or if you will cycle back to the first field.

Navigate in a Dialog Box

Navigating in a dialog box is the same for any windows application. You can use the keyboard or mouse to make choices. Any time a dialog box is open, you must answer the questions or at least choose Cancel or Close before you can do other tasks.

Steps

1. In many dialog boxes (such as Save As) when you first enter, text in a text box is already selected. Just start typing to replace the text, you do not need to click first.

2. To move to different areas of the dialog box, press Tab to go forward, Shift+Tab to go backward. If the option is a few Tabs away, click the option.

3. Click check boxes and option buttons to activate or deactivate them. For drop-down buttons, click the arrow and make a choice.

4. When you make choices with the mouse, the OK button or its equivalent remains the default choice and accepts all choices when you press Enter.


TIP: You can choose any option with an underlined letter in a dialog box by pressing the Alt key and that letter. For example, to select the Next button, press Alt+N.

Navigate with the IntelliMouse

The Microsoft IntelliMouse pointing device includes a small wheel between the left and right mouse buttons. The wheel rolls forward and backward and depresses. The IntelliMouse makes navigating in Access 97 easier.

Steps

1. To scroll the datasheet a few rows at a time using the IntelliMouse, roll the wheel up to scroll up, and down to scroll down.

2. To move to the next records in Form View, roll the wheel down. To move to the previous records, roll the wheel up.

3. To pan in the datasheet, form, or print preview window using the IntelliMouse, hold down the wheel as you drag in any direction to move the window in that direction.


NOTE: The wheel button on the IntelliMouse will function only if you install IntelliPoint 2.0 (or later) software and are using applications that take advantage of the IntelliMouse.

OLE Objects: Enter

One of the strengths of Access is its capability to accept non-textual data. This includes graphics, sounds, videos, and Windows application files. For example, in an employee database, you could include an employee's resume created in Word. In a Real Estate database, you could include a video tour of a house. Entering text and numbers is more straightforward. (See "Data: Enter.") To accept graphics and other similar data, you must first create a field with an OLE Object data type. (See: " Data Types: Changing" in the Table and Database Design part of this book.)

Steps

1. Open a table, query, or form in Datasheet or Form View and move to an OLE data type field.


2.
Choose Insert, Object to bring up the Insert Object dialog box.

3. If you need to create the data, choose the Create New option button and in the Object Type list box, double-click the type of application you want to create. Create and save the data.

If the file is already on disk, choose the Create From File option button and enter the location and name of the file in the File text box

If you need to edit an OLE object, double-click the object in a field. Access will launch the application that created the file or change toolbar buttons and the menu to allow you to edit the data.


NOTE: With some objects you can also first go to the application and copy the object. Then, go into an OLE object field on a datasheet or form and paste.

Records: Add New

You add new records to tables in either the Datasheet or Form View in Access.

Steps

1. Open the table or related tables in either the Datasheet or Form View.

2. Click the New Record button on the toolbar.

3. Enter the data you want in the first field, then press the Tab key to advance to the next field.

4. At the end of the record (the last field), press the Tab key to advance to the next record.

Access does not create a new record until you actually enter data into the first field of a new record.

Records: Copy

You can select one or more records in a datasheet and copy them to another datasheet. You can also copy data from a form; however, this is not practical because of the tab order. If you are copying data from a datasheet to a different part of the same datasheet, you probably need to redesign your database. You should not have information repeated often in your table. (See "Optimization: Split Database" in the Special Features and Programming part of this book.)

Steps

1. Open the table, query, or form in Datasheet View, then select the record(s) you want to copy.

2. Click the Copy button on the toolbar.

3. Open the datasheet that is the target for these records and set up the datasheet by moving fields so that the fields match up to the records on the Clipboard. You can click and drag column headers to change the order of fields in a datasheet.

4. To add the records at the end of the datasheet, choose Edit, Paste Append.


NOTE: If your primary key is an AutoNumber data type, the records will be renumbered using the sequence starting with the last number. If you have any indexed fields with no duplicates allowed (including a primary key that is not an AutoNumber field), Access will not allow you to copy data within the same table and you will get an error message.

Alternatively, you can cut records from one part of the datasheet and paste them in a different location in the current or other datasheet. You can also replace records by first copying records and then selecting the records to replace before you paste. However, because the primary key (which you should have in most cases) maintains sort order, moving records within the same table will not make a difference in the display order.

Records: Delete

You can manually delete records one at a time, or delete groups of records simultaneously through the use of delete queries. Delete queries enable you to delete groups of records in a single operation. (See "Delete Query" in the Queries and Filters part of this book.)

Steps

1. In Datasheet or Form View, click or drag along the record selectors to select the record(s) to be deleted.

2. Click the Delete Record button on the toolbar.


CAUTION: When you delete a record in the Datasheet View from a table involved in a relationship with another table, make sure that either you are enforcing referential integrity or that you take care of cascade deletions in the Relationship window. (See "Relationships Between Tables" in the Table and Database Design part of this book.) Do not delete a parent record and leave orphaned child records behind.


NOTE: You can set a property in the Design View called Allow Deletions that controls whether users can delete records in a form. You can also set a property called Allow Additions that controls whether records can be added.


TIP: If one of your fields is an AutoNumber field and you delete many records at the end of your table, the next AutoNumber will follow all the deleted records. If you want to reset your AutoNumber to be the last existing record's number, compact your database. (See " Database: Compact" in the File Management part of this book.)

Records: Go To

If you know the record number of the record you want, you can go to the record. Alternatively, use Find to go to the record you need. (See also "Data: Find.")

Steps

1. In Datasheet or Form View, select the current record number at the bottom of the window.

2. Enter the new record number.

Spell Check

You can check the spelling of your data in Datasheet or Form View; and check data in a table, query, or form in the Database window.

Steps

1. Select a single word or any area on a datasheet or form.

2. Click the Spelling button on the toolbar. If a word cannot be found in the dictionary, the Spelling dialog box appears.

3. Accept or edit the word in the Change To text box; and then choose the Change button. Or, choose the Change All button if you want to change this word throughout the document.

Alternatively, select one of the words from the Suggestions list, and then choose the Change or Change All.

4. If prompted, choose Yes to continue from the top of the document.

5. When an alert box tells you that the entire worksheet has been checked, choose OK.


NOTE: You can also choose to ignore fields when you get into the Spelling dialog box.

Width of Column

You may want to change the width of a column when you cannot see all of its contents. To change the width of a text box on a form, see "Controls: Size" in the Forms and Reports part of this book.


TIP: If you do not want to change column width, you can also press Shift+F2 to enter a dialog box to see multiple lines of an entry.

Steps

1. In Datasheet View of a table, query, or form, move the mouse pointer between two column headings until it is a double-headed arrow.

2. Drag to change the column width. To make the column as wide as the widest entry, double-click.


NOTE: Sometimes when you double-click, the column is wider than the screen and you cannot see the border of the column header to drag the column width back. In this case, use Format, Column Width to reset the column.

Window: Arrange

If you want to work on more than one portion of your database at a time, you can use the Window commands to display two different windows simultaneously.

Steps

1. Click the Minimize button to minimize any windows that you don't want to arrange.


2.
Choose Window; then Tile Horizontally or Tile Vertically, depending on how you want to arrange your windows.

Window: Hide and Unhide

In some cases you might need to keep a window open to have the values available but you also need to have the window out of the way. This could be the case when you need values off a form that will feed criteria in a query or for values on a report.

Steps

1. From the Database window, double-click the object you want to hide.

2. Choose Window, Hide.

To redisplay the window, choose Window, Unhide, and double-click the name of the object from the Unhide Window dialog box.


NOTE: To hide the Database window at startup, choose Tools, Startup and uncheck the Display Database Window check box. To display the hidden Database window, press F11. Use the Object.Hide method to hide an open object through VBA.

RLE Banner NetworkRLE Banner Network


  • Главная
  • Новости
  • Новинки
  • Скрипты
  • Форум
  • Ссылки
  • О сайте




  • Emanual.ru – это сайт, посвящённый всем значимым событиям в IT-индустрии: новейшие разработки, уникальные методы и горячие новости! Тонны информации, полезной как для обычных пользователей, так и для самых продвинутых программистов! Интересные обсуждения на актуальные темы и огромная аудитория, которая может быть интересна широкому кругу рекламодателей. У нас вы узнаете всё о компьютерах, базах данных, операционных системах, сетях, инфраструктурах, связях и программированию на популярных языках!
     Copyright © 2001-2024
    Реклама на сайте