microsoft access 2002 for windows support access 2002 for windows handout: 4 academic computing...
TRANSCRIPT
Microsoft Access 2002 for Windows Handout: 4
Academic Computing
Support
Information Technology Services Tennessee Technological University
February 2004
1. Opening the File
In the PC labs, from the Start menu: Select All Programs MSOffice XP Microsoft Access
• In the task pane on the right, double click on Assets.mdb Or from the menu, select File Open
• Navigate to the location that you saved the file in the last class: on the U: drive in the PC Labs
Or in the PC Labs, copy the file from ClassFiles on Athena > ITS > Access > Class 4 > Assets.mdb to your U: drive (My Documents).
2. Sorting and Grouping in Reports
Create a new query in Design View using the fields shown below. Name it: Employees and Dept
Information Technology Services March 2004
Information Technology Services March 2004
Access 2002 - Handout 4 Page 2
2. Sorting and Grouping in Reports (cont.)
• Under Objects, select Reports. • Select Create a report using the wizard. • Select the Query: Employees and Dept • Move the fields in this order:
Department, LastName, FirstName, Phone, DateHired, Salary
• Accept the selection to view your data by Departments. • Click Next. • Do not add any sorting, click Next. • Select a Stepped layout and a Landscape Orientation. • Select a style, such as Corporate • Give your report the title: Employees by Department
• Click Finish. • View the result.
Adding Sorting and Grouping from Design View
• Select Design View.
• From the menu, select View Sorting and Grouping
• Under Field/Expression, select LastName and note the Sort Order is Ascending
• Select FirstName • Return to Preview to see
the result.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 3
2. Sorting and Grouping in Reports (cont.)
• From the menu, select View Sorting and Grouping again.
• Select LastName, in the Group Header box, select Yes
• Note the section created on the report. • In Design view, drag the field LastName into the
new section LastName Header • View the result.
3. Creating Static Web Pages
From Reports
• Under Reports, click once to select (highlight) the Employees by Dept report.
• From the menu, select File Export • Browse to your U: drive/My Documents • Under Save as type: select HTML
Documents • Check the box Autostart in order to view the
result. • Click Export. • Accept the default encoding
and click OK.
• View the result which should look similar to that on the next page.
• Double click to open My Documents on your desktop.
• Note that two files were created complete with navigation links to move from one to the other.
• These could be added to an existing web site, but remember that they are static pages and do not show changes that occur in your database.
• You could also use these as attachments to quickly share reports with others as HTML documents.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 4
3. Creating Static Web Pages (cont.)
From Reports
Static Web Page created from the report.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 5
3. Creating Static Web Pages (cont.)
From Tables
• Under Objects, select Tables • Click to highlight the Assets table • From the menu, select File Export
• Under Save as type: select HTML Documents • Check the box Autostart in order to view the result. • Check the box Save formatted for a slightly more polished look. • Click Export. • Accept the default encoding and click OK.
• View the result.
• Note that any of these static pages can be imported into a web site and edited with programs such as FrontPage or Dreamweaver.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 6
4. Creating Data Access Pages
Use this method only if everyone will be using Internet Explorer 5.0 or later and has Microsoft Office XP Web Components installed.
• Under Objects, select Pages • Select Create Data Access Page by using Wizard
• Select the table Departments. • Select both fields and click Next. • Select no grouping and click Next. • Sort on Department and click Next. • Accept the suggested title of Departments. • Click Finish.
• The page opens in Design view • Add a title: Departments • Rearrange fields to be side by
side
• Right-click on the Navigation bar • Select Navigation Buttons • Uncheck Delete so that users can
not delete records only add. • Close and Save
Note the warning about the location being specified as an absolute path. If you want to use this on a network, you must change the location specification later in two places.
• Go to U: drive and open the file.
• Note it asks for a password.
• Click through the records.
• Add another department of your choosing. • CLOSE the browser.
• Return to Access and note the added department under Tables in Departments.
Note: If you put these pages on a network, you must set security on the files to allow others to read, execute, and write. Do this in Windows by right clicking on the file/folder and select Properties Security tab.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 7
4. Creating Data Access Pages
To change the location linking the web page to the database.
• Open the page in Design View • Right-click on the page and select Page Properties from the menu. • Click on the Data tab. • Click in the ConnectionString property box
• Click Shift+F2 to get the Zoom view • Look for the string beginning with Data Source= (highlighted below)
This is the location of the database. • Edit the location to the correct network location using UNC notation. • For example on the TTU Web site, if there was a web named ewells with a folder
named assets with the database named assets.mdb, the UNC would be: \\ttuweb\www\ewells\assets\assets.mdb
Information Technology Services March 2004
Access 2002 - Handout 4 Page 8
4. Creating Data Access Pages (cont.)
To change the location linking the web page to the database (cont.)
• In addition, you must change the location on the link to the HTML page shown in Access.
• Right-click on the page named Departments
• Select Page properties from the menu.
• In the Path box, edit to a UNC location as explained on the previous page. This is the location of the .htm file.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 9
4. Creating Data Access Pages (cont.)
• Create another Data Access Page using the Query Employees and Dept
• Select all the fields in the order indicated.
• Group by Department. • Sort by LastName. • Sort by FirstName.
• Check Do you want to apply a theme to your page?
• Choose a theme from those listed. • Accept the title.
• In Design view: Add a title on the page
• View your result. • Click on the plus near
department to reveal details of employees.
• Note dual navigation bars.
Information Technology Services March 2004
Access 2002 - Handout 4 Page 10
5. Getting Help
One of the easiest ways to get help with Microsoft Access is the comprehensive online help included with it.
• From the menu, select Help Microsoft Access Help
• For example, click on the Answer Wizard tab and type examples of expressions to find information on this topic.
• Should you have a question that the online help does not address, please contact the Microcomputer Support Office: [email protected]
• Students may call the Helpdesk at 372-3975 or get assistance in the PC labs in person.
• Handouts on using other programs are available on the web under ITS Documentation: http://www.tntech.edu/its/pubs/