📄 ch03.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Symantec Visual Page 1.0">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<TITLE>Ch 3 -- File Management</TITLE>
</HEAD>
<BODY BACKGROUND="../buttonart/bg1.gif" BGCOLOR="#FFFFFF">
<P>
<TABLE BORDER="0" WIDTH="600">
<TR>
<TD WIDTH="80" VALIGN="TOP"><IMG SRC="../buttonart/que.gif" WIDTH="75" HEIGHT="24" ALIGN="BOTTOM" BORDER="0"><BR>
<BR>
<A HREF="index.htm"><IMG
SRC="../buttonart/toc.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="TOC" BORDER="0"
NAME="toc4"></A><BR>
<A HREF="ch02.htm"><IMG
SRC="../buttonart/back1.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="BACK" BORDER="0"
NAME="toc1"></A><BR>
<A HREF="ch04.htm"><IMG
SRC="../buttonart/forward.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="FORWARD"
BORDER="0" NAME="toc2"></A><BR>
<A HREF="index.htm"><IMG
SRC="../buttonart/home.gif" WIDTH="40" HEIGHT="40" ALIGN="BOTTOM" ALT="HOME" BORDER="0"
NAME="toc3"></A></TD>
<TD WIDTH="520" VALIGN="TOP">
<H2><FONT COLOR="#000077">Microsoft® Access 97 Quick Reference</FONT></H2>
<P>
<H1 ALIGN="CENTER"><FONT COLOR="#000077">- 3 -<BR>
File Management</FONT></H1>
<P>Each <I>table</I>, <I>query</I>, <I>form</I>, and <I>report</I> is a <I>database</I>
object that you can copy, rename, create a description of, and set properties for.
You can create database objects by importing them from another Access database. You
can create tables in Access by importing them from or linking them to another <I>data
source</I>. You can import as well as export files.</P>
<P>To keep your database in good shape, you need to work with several procedures.
Backing up your data is the most important of these operations; however, compacting
the database and repairing will be necessary at times. If you are on a network with
multiple users, you may want to explore <I>replication</I> to decrease network traffic
while still updating your databases. With multiple users, you also need to consider
security--that is, who should and who should not have access to the database file
and the objects inside.
<H2><FONT COLOR="#000077"><B>Back Up Data</B></FONT></H2>
<P>It is very important to back up your database in order to protect your data. Access
automatically saves results to disk, and will overwrite data based on queries and
other actions you perform. Often, your backup is the only protection you have from
data loss.</P>
<P>You can also copy the database file using any of the following methods: Windows
NT Explorer, Microsoft Backup, MS-DOS COPY command, or any other backup software
that works with Windows 95.
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>TIP:</B></FONT><B> </B>Compact the database before you back
it up to save disk space. (See "Database: Compact.")
<HR>
</BLOCKQUOTE>
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1.</B> From the <I>Database window</I>, click the Open button on the toolbar.
<P>
<DD><B>2. </B>Navigate to your file's location by using the Look <U>I</U>n drop-down
<I>text box</I> and file list.
<P>
<DD><B>3.</B> Right-click the file name and choose <U>C</U>opy.
<P>
<DD><B>4.</B> Right-click the file <I>list box</I> in the white area (in other words,
do not click a file or folder) and choose <U>P</U>aste.
</DL>
<P>The backup file name is <I>Copy of <Your Database Name></I>.
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>If you use the security features
of Access, you should also back up the <I>workgroup</I> information file occasionally.
In Access 1 and 2, the default name for the file is SYSTEM.MDA. In Access 95 and
97, the default name is SYSTEM.MDW.
<HR>
</BLOCKQUOTE>
<P>Access does not create a new <I>record</I> until you actually enter data into
the first <I>field</I> of a new record.
<H2><FONT COLOR="#000077"><B>Database Object: Copy</B></FONT></H2>
<P>Not only can you back up the entire file, you can also back up individual objects
such as a <I>form</I> or <I>report</I> before you make a major change to the <I>object</I>.
For example, if you experiment with <I>action queries</I>, a good idea would be to
copy the underlying <I>table</I>.
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>When you copy a table with copy
and paste, Access asks you if you want to copy just the structure (design), the structure
and data, or append the data to an existing table. Copying the structure enables
you to modify the table for another use. Copying the structure and data creates a
backup copy of the table. Append is an alternative to an Append <I>Query.</I> (See
"Action Query: Append Query" in the Queries and Filters part of this book.)
<HR>
</BLOCKQUOTE>
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1. </B>Close the <I>object</I> you want to copy and any related <I>form</I>,
<I>query</I>, or <I>report</I> based on that object.
<P>
<DD><B>2. </B>Press F11 to go to the <I>Database window</I>.
<P>
<DD><B>3. </B>Select the object name from the Database window and click the Copy
button on the toolbar.
<P>
<DD><B>4. </B>Click the Paste button on the toolbar. In the Paste As <I>dialog box</I>,
give the object a name.
</DL>
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>TIP:</B></FONT><B> </B>When you use this copy feature for
backup purposes, keep your naming consistent. For example, name the object "Backup
of <original name>" or "ZZZ of <original name>." This
will put all backups in one spot. When you're done with the backups, delete them
(see "Database Object: Delete") and Compact the database (see "Database:
Compact").
<HR>
</BLOCKQUOTE>
<H2><FONT COLOR="#000077"><B>Database Object: Delete</B></FONT></H2>
<P>If you no longer need an <I>object</I> (for example, if you have created a backup),
it is a good idea to delete the object from the <I>Database window </I>to save space
and then compact to speed up the database. (See "Database: Compact.")
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>CAUTION:</B></FONT><B> </B>Deleting an object is an irreversible
operation. Make sure you truly want to delete the object. Deleting the object will
affect any other object that is based on the deleted object. For example, when you
delete a <I>table</I>, any related table, query, report, or form will not work.
<HR>
</BLOCKQUOTE>
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1. </B>Press F11 to go to the Database window.
<P>
<DD><B>2. </B>Select the object name from the Database window and press the Delete
key on the keyboard.
<P>
<DD><B>3. </B>At the warning prompt, confirm that you want to delete the object.
</DL>
<H2><FONT COLOR="#000077"><B>Database Object: Description</B></FONT></H2>
<P>In addition to long names of up to 64 characters for the objects, you can also
have descriptions for each <I>object</I> in the <I>Database window</I>. To see the
descriptions, click the Details button on the Database toolbar.
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1. </B>Press F11 to go to the Database window.
<P>
<DD><B>2. </B>Right-click the object name from the Database window and choose <U>P</U>roperties.
<P>
<DD><B>3. </B>Enter text in the Description box; choose OK.
</DL>
<H2><FONT COLOR="#000077"><B>Database Object: Properties</B></FONT></H2>
<P>In addition to the description, each <I>object</I> has two other properties: Hidden
and Replicable. You can hide an object if you want it out of the way or you don't
want the user to know about the object. With the Replicable <I>property</I>, you
choose whether or not you want this object replicated (copied) when you replicate
your <I>database.</I> (See "Replication: Using Briefcase.")
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1. </B>Press F11 to go to the <I>Database window</I>.
<P>
<DD><B>2.</B> Right-click the object name from the Database window and choose <U>P</U>roperties.
<P>
<DD><B>3. </B>Check or uncheck the Hidden or Replicable <I>check boxes</I>; choose
OK.
</DL>
<P>To unhide an object you must first be able to see it. Here is an inherent contradiction.
However, you can show all hidden objects by choosing <U>T</U>ools, <U>O</U>ptions,
clicking the View tab, and checking the <U>H</U>idden Object box.
<H2><FONT COLOR="#000077"><B>Database Object: Rename</B></FONT></H2>
<P>When the current name of the <I>object</I> needs to change you can rename the
object. After you import a table (see the Import Data tasks in this part), the table
name is the same as the old file name. You might want to change the object name in
this circumstance and when you copy an object. (See "Database Object: Copy.")
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>CAUTION:</B></FONT><B> </B>If you rename a <I>table</I>
or <I>query</I> that is used in a <I>form</I> or <I>report</I>, the form or report
will no longer work. You can change the Data Source property to re-establish the
connection to the table or query (see "Forms and Reports: Data Source"
in the Forms and Reports part of this book).
<HR>
</BLOCKQUOTE>
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1. </B>Press F11 to go to the <I>Database window</I>.
<P>
<DD><B>2. </B>Right-click the object name from the Database window and choose Rena<U>m</U>e.
<P>
<DD><B>3. </B>Enter the new name in the box surrounding the name.
</DL>
<H2><FONT COLOR="#000077"><B>Database Properties</B></FONT></H2>
<P>Just as each individual <I>object</I> has <I>properties</I>, so too does the entire
database. The database properties include summary information such as author name,
subject, comments, and keywords. If you are using hyperlinks (see "Hyperlinks:
Create" in the Table and Database Design part of this book), the <I>Hyperlink</I>
base enables you to specify the initial folder for all relative links. The Contents
tab of the Database Properties <I>dialog box</I> provides the names of all the database
objects (just like the <I>Database window</I>). If you want, you can store additional
information about your database through the Custom tab.
<H3><FONT COLOR="#000077"><B>Steps</B></FONT></H3>
<DL>
<DD><B>1.</B> Choose <U>F</U>ile, Database Propert<U>i</U>es.<BR>
<BR>
<B>2. </B>Click the Summary or Custom tabs and enter any information you want.<BR>
<BR>
<B>3.</B> Click the General, Statistics, or Contents tabs to see more information
about your database; choose OK when finished.
</DL>
<BLOCKQUOTE>
<P>
<HR>
<FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>The General tab of the Database
Properties dialog box shows file attributes (such as Read-Only, Hidden, or Archive)
but the <I>check boxes</I> are grayed so you can't make a change. If you want to
change these properties, close the database, choose the Open button on the toolbar.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -