18
Access Advanced Academic Computing Services A Division of Information Services www.ku.edu/acs Abstract: This document introduces users to more advanced functions of  Microsoft Access. Participants will learn how to change join types of queries and build more advanced queries, such as action queries. They will learn how to create repo rts based off SQL statements and auto mate a database wi th macros. They will als o learn how to run the repair and co mpact utility. It is used in conjunction with the Access: Advanced workshop. Contents Introdu ction .............................................................................................................. .........2  Objecti ves ......................................................................................................................... 2  Prereq uisites ..................................................................................................................... 2  Related Traini ng Availab le from ACS........... ....................................................... ..............2  Query Join Types .............................................................................................................. 2  Creatin g Summary Queries. ................................................................................... ...........4  Creatin g Parameter Queries .............................................................................................5  Creatin g Crosstab Querie s............. ...................................................................................6  Understanding Action Queries .......................................................................................... 7  Creating SQL Reports....................................................................................................... 9  Using Macros to Automate a Database .......................................................................... 11  Compacti ng and Repairi ng a Databas e .......................................................................... 16  Getting Additi onal Help ................................................................................................... 18  © 2003 University of Kansas. All rights reserved 

Access 2000 Advanced

Embed Size (px)

Citation preview

Page 1: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 1/18

Access AdvancedAcademic Computing Services

A Division of Information Services

www.ku.edu/acs

Abstract: This document introduces users to more advanced functions of

Microsoft Access . Participants will learn how to change jointypes of queries and build more advanced queries, such as actionqueries. They will learn how to create reports based off SQLstatements and automate a database with macros. They will alsolearn how to run the repair and compact utility. It is used inconjunction with the Access: Advanced workshop.

Contents

Introduction .......................................................................................................................2

Objectives ......................................................................................................................... 2

Prerequisites .....................................................................................................................2

Related Training Available from ACS................................................................................2

Query Join Types .............................................................................................................. 2

Creating Summary Queries...............................................................................................4

Creating Parameter Queries .............................................................................................5

Creating Crosstab Queries................................................................................................6

Understanding Action Queries ..........................................................................................7 Creating SQL Reports.......................................................................................................9

Using Macros to Automate a Database .......................................................................... 11

Compacting and Repairing a Database ..........................................................................16

Getting Additional Help ................................................................................................... 18

© 2003 University of Kansas. All rights reserved

Page 2: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 2/18

ACS Computer Training Access Advanced

IntroductionMicrosoft Access 2000 is a relational database management system. This type of database allows a user to store, retrieve, manage and analyze data quickly and effectively.This particular handout, in conjunction with the Access Advanced class, is designed tohelp users with some of the more advanced features of Access , such as query join types,advanced types of queries, SQL reports, automating a database with macros, andcompacting a database.

ObjectivesThe goal of this workshop is to introduce participants to more advanced objects and ideasin Microsoft Access . After today's workshop, participants will be able to:

• Understand and change query join types

• Create and run parameter queries

• Create and edit the four type of action queries

• Create and edit reports based on SQL

• Create and execute macros

• Run the compact utility on a database

PrerequisitesIt is assumed that the participants in this workshop are familiar with tables, queries andrelationships, forms, and reports in Microsoft Access ; have taken Access: Introduction ,

Access: Intermediate , Access Forms , and Access Reports ; or have equivalent skills.

Related Training Available from ACSAll workshops offered by Academic Computing Services (ACS), a division of Information Services, are free to KU students, staff, faculty, and approved affiliates . Thegeneral public is also welcome to most workshops, but some ACS workshops require aregistration fee for them.

To learn more about or register for workshops, receive automatic announcements of upcoming workshops, and track workshops you’ve registered for and have attended, visitthe ACS Web site at www.ku.edu/acs/train . You can also check our online schedule atwww.ku.edu/acs/schedule for a list of class offerings and their availability. For further workshop related questions, please email [email protected] .

Query Join TypesWhen relationships are created between tables in Microsoft Access , there are JoinProperties that tell Access how the data is related. The Join Type tells Access whichrecords to select. There are three different kinds of join types in Access you can choosefrom through the Join Properties dialog box.

Academic Computing Services - 2 - © 2003 The University of Kansas A Division of Information Services

Page 3: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 3/18

ACS Computer Training Access Advanced

Inner JoinThe default join type when a relationship is created in Access is the Inner Join . Thistype of join, also known as an Equal Join , will only select records where the joined fieldshave matching values. When the query is run, Access joins the different records from thetables, so that it looks like one record.

Left Outer JoinA Left Outer Join shows all results in a query from the left side of the join, even if thereis no match on the right side. For example, if you had a query that showed studentsenrolled in classes, and you wanted to check to make sure all of the students in thedatabase were enrolled, you could change the join type to a left outer join. This type of

join would show all of the students, and if there were any blanks on the right side (thatwould be the side that showed the classes the students were enrolled in), you would knownot all of the students were enrolled.

Right Outer JoinThe third type of join type to choose from in the Join Properties dialog box is a RightOuter Join . This type of join does the exact opposite of the left outer join; thus, it showsall records from the right side of the join even if there are no matches on the left. This

join type is commonly used to check for errors in databases.

Note: In the Join Properties dialog box, you will not see the words Inner Join or Outer Join . You will see an option of 1, 2, and 3. An Inner Join is the default join type of 1. A Left Outer Join is a 2 and a Right Outer Join is a 3.

Changing Join TypesThere are a several places you can change a join type, but one of the most common placesis inside the Join Properties dialog box. To change a join type you can do the following:

1. Open the query whose join type you need to change in Design View.

2. Double click on the join line to activate the Join Properties dialog box and change the join type.

3. Click OK and run the query through the Run or Datasheet View button.

Academic Computing Services - 3 - © 2003 The University of Kansas A Division of Information Services

Page 4: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 4/18

ACS Computer Training Access Advanced

Creating Summary QueriesSometimes you might want to quickly group and summarize information inside of aquery without running a report. This type of query is called a Summary Query or Totals Query . A Summary Query can group specific information together and run acalculation for a specified field based on that group. The following steps take youthrough the process of creating one.

1. Create a query in design view, adding whichever fields you’ll need to do thegrouping and the field you’ll be summarizing.

Note: You need at least two fields for a summary query, one to use for grouping and the other to use for the calculation.

2. Click on the Totals button to add the Totals: row to the design grid.

3. Change the Group By option of the field you want to perform a calculation on byclicking beside the words Group By and clicking the drop-down arrow.

4. From the list, choose the function you want performed on the field. The following isan example:

5. Click on the Run button or Datasheet View button to run the query.

6. Save the query as needed.

Academic Computing Services - 4 - © 2003 The University of Kansas A Division of Information Services

Page 5: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 5/18

ACS Computer Training Access Advanced

Creating Parameter QueriesThere are many different types of queries you can create in a Microsoft Access database.Parameter queries are one such type. This kind of query is very convenient to a user

because it allows them to change the criteria value for the query each time it is run.Every time this type of query is run, a dialog box will appear, prompting the user to enter in criteria. To create a Parameter query, do the following:

1. Create a query in Design View; adding whichever fields you will need for your query.

2. In the field you want the parameter in, type the parameter prompt in the criteria insquare brackets. The following example might take place in a field such as state.

3. Save the changes to the query and click the Run or Datasheet View button.

4. When the query is run, the following prompt will appear:

Academic Computing Services - 5 - © 2003 The University of Kansas A Division of Information Services

Page 6: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 6/18

ACS Computer Training Access Advanced

5. Type in the criteria and press Enter or click the OK button.

6. The query will run only showing records that meet the criteria asked for.

Note: Custom forms or dialog boxes can also be created as a prompt for parameter queries. These are nice to be able to use when you want tohave a custom dialog box with more options that will run a reportwhen the criteria is entered. To create this type of dialog box, you willneed to know how to work with form properties and macros as well.

Creating Crosstab QueriesCrosstab queries are a type of query that displays data and can summarize (usingfunctions such as sum, average, etc…) data by grouping the information using field dataas column headers and using up to three different fields of information as row headers.

One of the easiest ways to create a crosstab query is through the Crosstab QueryWizard . Here are the steps for going through the wizard:

1. Click on the Queries button on the object bar and click on the New button.

2. In the dialog box, choose Crosstab Query Wizard and click OK .

3. In the first step of the wizard, choose the table or query whose fields you want to use

in your crosstab and click on the Next button.4. In the next step, double click on the field whose value you want to use as the row

heading. You’ll be able to choose up to three fields if needed. Click the Next buttonwhen finished.

5. The third step of the wizard looks very similar to the second step, but this timechoose which field’s values you want to use as the column header by clicking on thename of the field one time. Click the Next button to continue.

6. The fourth step of the wizard will prompt you to choose what kind of calculation youwant for each column and row intersection. Choose the field you want to use to dothe calculation under the Fields: column and choose the function you want to usefrom the Functions: column by clicking one time on each choice. Make sure youkeep the Yes, include row sums box checked if you want this included as well.Click the Next button to go to the last step.

7. Type in a name for your new crosstab query. Click the Finished button once you’refinished. Your query will either open in Design View or run for you to see therecords, depending upon which choice you made in the last step.

Academic Computing Services - 6 - © 2003 The University of Kansas A Division of Information Services

Page 7: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 7/18

ACS Computer Training Access Advanced

Note: If you need to make any structural changes to your query once it’s ran,you can change the view to Design View and make changes asnecessary.

Understanding Action QueriesSome types of queries can perform an action to a table. These are called Action queries.

Access contains four types of action queries: Make-Table, Delete, Update, and Appendaction queries.

Make-Table Query A Make-Table query does exactly as it says; it makes a table based off one or moretables and the fields and records that you choose. There are several reasons a make-tablequery might be needed. Here are a few of the following:

• To export information from several tables out of your database

• Creating a history of records instead of deleting records

• Making a back-up copy of a table

These are just a few reasons why a make-table query might be what you need. Anexample of when you could use a make-table query would be if you have to exportinformation out of your database from a query that contains a lot of tables and records.Exporting them from the query could take a lot of time, especially if the tables in thequery are linked in your database. Instead of doing it that way, you could make a table tofreeze the information and then export the records. Doing it this way, would take a lotless time.

Note: If you are re-running a make-table query many times and do not wantthe table to be written over each time it’s run, you can rename the tableright after running the make-table query.

Delete Query A Delete query deletes records you specify, by adding criteria, from one or more tables.For example, if you had a product or service that was being discontinued, you coulddelete those records, if they were no longer needed. The most important thing toremember about a Delete query is that it will delete the entire record.

Update Query Sometimes you might have a group of records that have a field that needs updating.Maybe find and replace won’t work in this case, because each value updated will besomething different, but you need to update them all at the same time.

For instance, let’s say that a group of employee’s receives a 3% raise, and you want toupdate them all together. You might be able to use an update query to update the entirefield for each record at the same time.

Academic Computing Services - 7 - © 2003 The University of Kansas A Division of Information Services

Page 8: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 8/18

ACS Computer Training Access Advanced

Append Query An Append query adds records from one table into another table. Append queries can behelpful in several different ways.

• Appending records to another table based on some criteria. For example, you might

choose to append any students that have unpaid parking tickets instead of trying tolook for them throughout the table or query, especially if you want to mail just thosestudents a notice.

• You might choose an append query after importing information from another source,instead of typing in all of the record information. For example, if you receive areport containing new student information, you could append the students into your student table instead of typing it all in.

Creating an Action Query Once you’ve decided which type of query it is you need, you can easily create it. To dothis, do the following:

1. Create a select query in Design View by adding only the fields you need.

Note: The only fields you’ll need to add are the ones that will make a newtable; the ones that you’re using information from to append to anexisting table; the field(s) that needs updating; or any field you’reusing to designate criteria.

2. Change the query type using the Query Type button .

Note: Dependent upon which type of query you’ve chosen, depends on whathappens next. For instance, if you choose a Make-Table query, you

will be prompted to give the new table a name. If you choose anAppend query, you’ll be prompted to choose which table you want toappend the records to. Then, an Append To: row will be added to thedesign grid. If the field names are identical, Access will match up thecorrect fields in the new row. Otherwise, you will need to choose thefield names from the drop down arrow as you click in each cell. If youchoose an Update query, an Update To: row will be added to thedesign grid. Choosing a Delete query will add a Delete row to thedesign grid and place Where under field names. Then, you must addcriteria as needed to the criteria field if you only want to delete certainrecords that meet a condition.

3. Add in the necessary criteria for the query and click on the Datasheet View button tocheck your information.

Note: This is an important step because once you change the query to anAction query and run it with the Run button, the changes requestedwould be made to the table you choose. You cannot click on undo toundo the changes!

Academic Computing Services - 8 - © 2003 The University of Kansas A Division of Information Services

Page 9: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 9/18

Page 10: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 10/18

ACS Computer Training Access Advanced

6. When you click on the Build button, the SQL Statement: Query Builder will beinvoked. When this happens, your screen will change and look similar to thefollowing:

7. In the Show Table dialog box, double click the tables you want to base the SQLStatement from or click on the tables and click the Add button.

8. Once all of the tables are added, you can close the Show Table dialog box.

9. Add the fields that you want to be able to use in the report and/or fields you need for criteria.

10. Once you’ve finished, click the File menu and choose Close or click the corner closewindow button. You’ll be returned to the Design View of the report.

11. Close the Report Properties dialog box and the Field List box should open. If for

some reason it doesn’t, click on the Field List button to open the list.

12. Once the Field List button is open, you can choose the fields you want to build your report. Continue to build the report as you normally would and save your changes.

Note: If you have already created a query that contains most of theinformation you’d like to embed into the Record Source property of areport, you can open the query and change the view to SQL View ,copy the SQL statement, and paste it into the Record Source propertyof the report.

Academic Computing Services - 10 - © 2003 The University of Kansas A Division of Information Services

Page 11: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 11/18

ACS Computer Training Access Advanced

Using Macros to Automate a DatabaseWhen you create an Access database, there may be times when you need certain events tohappen automatically. For instance, you might want a user to be able to click on a buttonto export information into a desired program or format, or maybe there are specific fields

that have to be filled in before a record can be saved. Macros can automate these typesof tasks.

A macro consists of one or more actions that perform specific operations, such asopening and maximizing a form, generating an email to send information from your database, or running objects such as forms or reports. These types of actions are calledevents . An event can be an action caused by a user, such as a mouse click, form or reportopening, data being changed, or using keyboard shortcut keys; or events can be triggered

by the system, such as a program opening or setting an action to be performed on certaindates and times. When you associate events with event properties , you can tell Accessto run a macro or event procedure when the event occurs.

Note: An event procedure is a process that is automatically executed due toa user performing an action, a program code, or triggered by thesystem.

When you specify a particular action from the action list or set of actions for a macro,you will have to set what are known as Action Arguments . The arguments tell themacro more specifically how to carry out the action requested and/or where to carry outthat action.

There are several different ways in which macros can be created. They can be macrosthat run when a button is clicked; when the mouse is moved; when a form or other objectis opened or closed; when a control on a form receives or loses focus (when the user moves into or out of that field); when information in a control or record is changed; or

when certain conditions are met. There are also many different types of macros that can be created.

Note: Each of the following types of macros can be used together or separately. For example, you could have a macro group that containscertain macros that run based on conditions and/or events and areassigned to an event property of a control.

Types of Macros

Macro Groups

Academic Computing Services - 11 - © 2003 The University of Kansas A Division of Information Services

Macro Groups are macros in which there are several macros grouped together becausethey perform the same type of action or were created for one object, such as a particular form. Grouping these related macros together in one place helps make it easier to keeptrack of them. Whenever you group macros together though, even though the macrogroup will have a name, each individual macro in the group will also have a distinctname. That way, if you want to run one of the macros in the group by itself, you havethat option.

Page 12: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 12/18

ACS Computer Training Access Advanced

Conditional MacrosMacros can also contain Conditional Expressions when needed. These types of conditional macros run only if certain conditions or criterion are met. For example, if auser was filling out information in a form, and they left a field null (no value or data inthe field), you might want a macro to run that would open a custom dialog box telling

them to fill out the field they left null. You might also want the focus to immediatelyshift back to that field (their cursor would be back in the field). However, if they did fillin the data for that field, then you wouldn’t want that macro to run. This type of macrowould be a conditional macro.

Macros Based on EventsEvents are actions initiated by the user or the system. These can be actions such asopening or closing objects, clicking a button with the mouse, or changing data in acontrol. As you create macros, sometimes you’ll want them to run based on these typesof events. To do this, you’ll want to attach them to event properties .

Event properties are what cause a macro or event procedure in Visual Basic to run when a

particular event occurs. For example, if you attach a macro name that maximizes awindow to the On Open property of a form, when the form opens, the form window willalways maximize.

When you find the event property you need, you can click in the property and click on theBuild button and choose Macro Builder . When you do this, the Design View of a newmacro window will open and prompt you to name your macro. Once you’ve created your macro, don’t forget to save the changes before closing the window and returning to theform or other database object. If you forget to do this, Access will prompt you to saveanyway.

Creating Basic MacrosThere are several ways that you can create macros in your database. One way to create amacro is by going through the macro window. Here’s how:

1. In the Macro window, click on the New button.

2. Click in the Action column.

3. When the drop down arrow appears, click on the drop down arrow and choose theaction you want.

4. When you’ve chosen an action, press Tab on your keyboard to move to theComment field. This field is useful to explain what each action does and iscommonly used for documentation.

5. If the action you’ve chosen hasarguments

, they will appear for you to fill in theinformation.

6. Once you’ve chosen all of the needed actions and filled in the arguments, make sureyou save the macro by clicking on the Save button. Name the macro and click OK .

Once you’ve finished, either run the macro by clicking on the Run button or closethe macro window. For further running options, see Running Macros .

Academic Computing Services - 12 - © 2003 The University of Kansas A Division of Information Services

Page 13: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 13/18

ACS Computer Training Access Advanced

Creating Macro GroupsTo create a macro group, do the following:

1. In the Macro window, click on the New button.

2. Click on the Macro Names button.3. The Macro Name column will appear for you to type in the first macro name.

4. Tab to the Action column.

5. When the drop down arrow appears, click on the drop down arrow and choose theaction you want.

6. When you’ve chosen an action, press Tab on your keyboard to move to theComment field. This field is useful to explain what each action does and iscommonly used for documentation.

7. If the action you’ve chosen has arguments , they will appear for you to fill in theinformation.

8. If the macro you’re creating has more than one action, skip the macro name columnand continue choosing the actions and filling in the arguments you need for themacro.

9. Once you’ve chosen all of the needed actions and filled in the arguments, go back tothe macro names column and name the next macro. Continue choosing actions andfilling out the argument information for each macro.

10. Once you’ve finished, make sure you save the macro group by clicking on the Save button. Name the macro and click OK .

Creating Conditional MacrosTo create a conditional macro, do the following:

1. In the Macro window, click on the New button.

2. Click on the Conditions button to open the condition column.

3. Type in the condition that you want and press Tab .

4. Tab to the Action column.

5. When the drop down arrow appears, click on the drop down arrow and choose theaction you want.

6. When you’ve chosen an action, press Tab on your keyboard to move to the

Comment field. This field is useful to explain what each action does and iscommonly used for documentation.

7. If the action you’ve chosen has arguments , they will appear for you to fill in theinformation.

a. If the macro you’re creating has more than one action and you want the conditionto continue, in the conditions column use … in the conditions column to tellAccess to continue the condition.

Academic Computing Services - 13 - © 2003 The University of Kansas A Division of Information Services

Page 14: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 14/18

ACS Computer Training Access Advanced

b. If you do not want the condition to continue, skip the conditions column andcontinue choosing the actions and filling in the arguments you need for themacro.

8. Once you’ve finished, make sure you save the macro by clicking on the Save button. Name the macro and click OK .

Note: You can also create conditional macros from an event property in aform from a control’s event property.

Macros Based on EventsThere might be times when you’re creating a form and need to create a macro that willrun when certain events are performed. One example of this would be to create a macrothat maximizes a form when the form opens. Another example of this might be to run amacro based on a certain condition, such as a control being left null. You could alsocreate a macro group at that time. Here’s one example:

1. In the event property of the control in which you want to attach a macro name, click

on the Build button.

2. Choose Macro Builder and click OK . When you do this, the design window of amacro will open and you will automatically be prompted to save the macro.

3. Follow any of the steps as mentioned above and create your macro. Click on theSave to save the macro again. If you do not do this, when you close the macrowindow, you’ll be prompted to save again.

4. Once back inside of the form, test the macro. If it works like you want it to, click onthe Save button. If it does not work like you think it should, try Debugging themacro by Single Stepping through it. For more information about single steppingthrough a macro, see Debugging Macros .

Academic Computing Services - 14 - © 2003 The University of Kansas A Division of Information Services

Page 15: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 15/18

ACS Computer Training Access Advanced

Running MacrosYou’ll also find there are several different ways in which you can run a macro, dependentupon which type of macro you create. If you create a conditional macro, the macro willonly run when the condition is met. If you create a stand-alone macro, there are severaldifferent ways you can choose to run it. Here are just a few of the following:

• Double click the name of the macro in the macro window

• Open the macro in Design View and click on the Run button.

• Create a button and place it on one of your toolbars.

• Create a new toolbar containing the macro button(s) you want.

• Create a command button that you can click on to run the macro.• Assign a macro to a key combination.

o To do this, you’ll have to save the macro under a special name called Autokeys .

o This type of macro is a macro group.

Academic Computing Services - 15 - © 2003 The University of Kansas A Division of Information Services

• Make the macro run automatically when the database opens.

Page 16: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 16/18

ACS Computer Training Access Advanced

o To do this, you’ll have to save the macro under a special name called AutoExec .

Note: Microsoft Access has many types of macro Actions each with differentarguments. For more information about the different actions and their arguments, open up Help and on the Answer Wizard tab, type inActions . Access should list many of the different ones for you and listthe arguments for each action. Also listed might be some examples of how and when to use the action.

Debugging MacrosWhen a macro does not run correctly, you’ll usually receive some sort of error messagetelling you that the macro action isn’t available and you’ll be given an option to halt themacro. In order to find out where the problem occurred, you can try debugging a macro

by using the Single Step button to go through each action one at a time very slowly.Here’s how:

1. Open the macro you want to single step through by clicking on the Design View

button.

2. Click on the Single Step button to turn on single stepping.

3. Click on the Run button to perform the first action.

4. Click on the Step button each time you’re ready to go to the next action.

5. When the macro fails, you’ll receive a dialog box indicating that the action isn’tavailable and to click on the Halt button.

Compacting and Repairing a DatabaseAs you create and change your database, it will grow, even as you delete objects in it youno longer need. The larger your database grows, the more cumbersome it can become.Running the Compact and Repair Database… will help to reduce the size of thedatabase, so that it will work more smoothly. Here is how you can run it.

1. You can compact the database with it closed or open. If the database is shared withother users, you will have to make sure nobody else has it opened when you run theutility.

a) If you compact the database when it’s open:

i. Click on the Tool menu and hover over Database Utilities .

ii. Click on Compact and Repair Database…

iii. The database will close and you will see a blue dotted line run across theStatus bar at the bottom of the screen above Start .

iv. Once it has finished compacting, the database will reopen.

b) If you compact the database when it’s closed:

i. Keep Access open and click on the Tool menu and hover over DatabaseUtilities .

ii. Click on Compact and Repair Database… Academic Computing Services - 16 - © 2003 The University of Kansas A Division of Information Services

Page 17: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 17/18

ACS Computer Training Access Advanced

iii. Locate the database you want to compact in the Database to compact from dialog box.

iv. Either double click on the name of the database or select the database nameand click the Compact button.

v. In the Compact Database Into dialog box, if you want to compact thedatabase back into itself instead of making a copy of it, select the databasename again and click on the Save button.

vi. The following dialog box will appear, asking you if you want to replace theexisting database:

vii. Click on Yes .viii. The repair and compact utility will run, and you will be able to see the status

along the Status bar at the bottom of the screen above Start .

2. Once you have compacted your database, you’ll be able to notice the size difference by looking at the details in the Open dialog box or through Windows Explorer .

Academic Computing Services - 17 - © 2003 The University of Kansas A Division of Information Services

Page 18: Access 2000 Advanced

7/27/2019 Access 2000 Advanced

http://slidepdf.com/reader/full/access-2000-advanced 18/18

ACS Computer Training Access Advanced

Academic Computing Services - 18 - © 2003 The University of Kansas A Division of Information Services

Getting Additional HelpACS provides consulting and Q&A help in a variety of ways:

785/[email protected] www.ku.edu/acs/help

To evaluate this course online, please visit www.ku.edu/acs/training/evaluation

Last Update: 05/10/2002