Download presentation
Presentation is loading. Please wait.
1
GO! with Microsoft Access 2016
GO! with Microsoft Access 2016 Comprehensive Gaskin Graviett
2
Access 2016 – Chapter 9 Integrating Access with Other Applications
3
Objectives Import Data from a Word Table
Use Mail Merge to Integrate Access and Word Import Data from an Excel Workbook Export Data to Excel Export Data to an HTML File and an XML File Insert an Excel Chart into a Report Import from and Link to Another Access Database Export Data to Word The objectives of this chapter are: Import Data from a Word Table Import Data from an Excel Workbook Insert an Excel Chart into a Report Import from and Link to Another Access Database Export Data to Word Use Mail Merge to Integrate Access and Word Export Data to Excel Export Data to an HTML File and an XML File
4
Prepare a Word Table for Importing
When you create a database, you can type the records directly into a table. You can also import data from a variety of sources. Importing is the process used to bring in a copy of data from one source or application to another application. For example, you can import data from a Word table or Excel spreadsheet into an Access database. Data can be imported in various ways. An imported table can overwrite an existing table or append data to an object with the same name in the existing database. Linked data can change the data in the database, and the change will be updated in the source document and vice versa; imported data will not be synchronized between the imported object and the source object. To prepare a Word table for importing, verify that the insertion point is in the table. On the TABLE TOOLS LAYOUT tab, in the Data group, click the Convert to Text button. In the displayed Convert Table to Text dialog box, verify that the Tabs option button is selected, and then click OK. Display Backstage view and click Save As. In the Save As dialog box, in the File name box, select the existing text, and then type your filename. Click the Save as type arrow, and from the displayed list, scroll down, and then click Plain Text. In the Save As dialog box, click Save. This is the delimiter character you will use to separate the data into fields To import data from a Word table into an Access table, the data must be converted or changed to a delimited file or a file where each record displays on a separate line, and the fields within the record are separated by a single character called a delimiter. A delimiter can be a paragraph mark, a tab, a comma, or another character.
5
Import Data from a Word Table
To import data from a delimited text file, click the Text File button on the EXTERNAL DATA tab, in the Import & Link group. In the displayed Get External Data - Text File dialog box, to the right of the File name box, click Browse. Navigate to your saved delimited text file. In the Get External Data - Text File dialog box, verify that the Import the source data into a new table in the current database option button is selected, and then click OK. In the Import Text Wizard dialog box, verify that the Delimited option button is selected, and then click Next. Continue the steps in the Import Text Wizard and click Finish. The source file, the one being imported, is listed in the File name box. When importing, if a table with the same name as the imported table does not exist, Access creates the object. If a table with the same name exists in the database, Access might overwrite its contents with the imported data. If you modify data in the original text file, the data will not be updated in the Access database. A link is a connection to data in another file. When linking, Access creates a table that maintains a link to the source data. You cannot change or delete data in a linked Access table; however, you can add new records. When you import or export data in Access, you can save the settings you used so that you can repeat the process at any time without using the wizard. The name of the source file, the name of the destination database, primary key fields, field names, and all the other specifications you set are saved. Even though all of the specifications are saved, you can still change the name of the source file or destination file before running the import or export specification again. You cannot save the specifications for linking or exporting only a portion of a table.
6
Importing Versus Linking Database Files
If you have data in other applications that you would like to import or link to your Access database, explore the options on the External Data tab, in the Import & Link group, by clicking More. A SharePoint List is a list of documents maintained on a server running Microsoft Office SharePoint Server. A SharePoint Server enables you to share documents with others in your organization. You also can import data from other database applications, such as dBASE and ODBC databases. ODBC stands for Open Database Connectivity, a standard that enables databases using SQL statements to interface with one another. You can also import or link to an Outlook folder. Data can also be imported from or linked to an HTML—HyperText Markup Language—document or Web document. HTML is a language used to display webpages.
7
Import Data from an Excel Workbook
A workbook is an Excel file that contains one or more worksheets. A worksheet is the primary document used in Excel to save and work with data that is arranged in columns and rows. You can import the data from an Excel workbook into Access by copying the data from an open worksheet and pasting it into an Access datasheet, by importing a worksheet into a new or existing Access table, or by creating a link to a worksheet from an Access database. There is no way to save the workbook as an Access database within Excel; the individual worksheets within a workbook must be imported into an Access database. To import data from an Excel workbook, click the EXTERNAL DATA tab. In the Import & Link group, click the Excel button. In the Get External Data - Excel Spreadsheet dialog box, to the right of the File name box, click the Browse button. Navigate to the location where your Excel workbook is stored. Locate and open the file. In the Get External Data - Excel Spreadsheet dialog box, click OK. Follow the steps in the Import Spreadsheet Wizard to import the Excel data into Access. In the final Import Spreadsheet Wizard dialog box, in the Import to Table box, type a name for your table, and then click Finish. If a workbook contains a chart on a separate worksheet, when you try to import any worksheet into Access, a message box displays stating that the wizard cannot access the information in the file and that you should check the file you want to import to see whether it exists and whether it is in the correct format. You should make a copy of the workbook, open the copied workbook, and then delete the worksheet containing the chart or move the chart to the sheet with the related data. Save the workbook, close it, and then import the data from any of the worksheets.
8
Append Data from Excel to an Access Table
When you import data from an Excel file into a table that you have already created, you can append, or add into, the existing data records already in the table. To append data, the table must already be created and the fields and data types must match. To append data from Excel to an Access table, click the EXTERNAL DATA tab. In the Import & Link group, click the Excel button. In the Get External Data - Excel Spreadsheet dialog box, click Browse, and then navigate to the location where the Excel file is stored. Under Specify how and where you want to store the data in the current database, click Append a copy of the records to the table. Click the table name box arrow to display the names of the tables in the database. Follow the steps in the Import Spreadsheet Wizard to append data into an existing Access table.
9
Insert an Excel Chart into a Report
A chart is a graphic representation of data. Data presented in a chart is easier to understand than a table of numbers. Column charts display comparisons among related numbers, pie charts display the contributions of parts to a whole amount, and line charts display trends over time. Excel is the best tool for creating a chart because there are a wide variety of chart types and formatting options. To insert an Excel chart into the Page Footer section of an Access report, open the report in Design view, point to the top of the Report Footer section bar until the pointer displays. Drag the section down to increase the size of the Page Footer section. Start Excel. If necessary, maximize the Excel window. Navigate to the location where the Excel file is stored. Click the outside edge of the chart to select the entire chart. On the HOME tab, in the Clipboard group, click the Copy button to place a copy of the pie chart in the Office Clipboard. Close Excel. Click the Access button on the taskbar to activate the database. Right-click the Page Footer section bar, and then click Paste.
10
Import Data from Another Access Database
When you import data from another Access database, Access creates a copy of the source data without altering the source data. All of the objects in a database can be imported or copied to another Access database in a single operation. Import data from another Access database when you need to create similar tables or when you want to use the structure of the source database tables. Link to data in another Access database when the data is shared among multiple databases or if someone else needs to have the ability to add records and use the data but not change the structure of the table. To import the data contained in another Access database, click the Access button on the EXTERNAL DATA tab, in the Import & Link group. In the Get External Data - Access Database dialog box, click Browse. If necessary, navigate to the location where the second database is stored and then double-click the file. Verify that the Import tables, queries, forms, reports, macros, and modules into the current database option button is selected, and then click OK. In the Import Objects dialog box, click the TABLES tab. In the Import Objects dialog box, click the table you are importing. The source database must be closed before you can import data from it. The destination database must be open. To import the data into a new database, you must create a blank database before starting the import operation. You can also import queries and reports with the same method by clicking the QUERIES tab or the REPORTS tab in the Import Objects dialog box. You can import table relationships, custom menus and toolbars, saved import/export specifications, and custom Navigation Pane groups. For tables, you can import the table definition and data or only the table definition. The definition is the structure of the database—the field names, data types, and field properties. You can import queries as queries or as tables. If you import a query as a query, you must also import the underlying table or tables used to create the query. Importing a query, form, report, subform, or subreport does not automatically import the underlying record sources. If you create one of these objects using the data in two related tables, you must also import those two tables; otherwise, these objects will not open properly.
11
Link to a Table in Another Access Database
You can also link data in a table in another Access database. You can link only to tables in another Access database; you cannot link to queries, forms, reports, macros, or modules. To link data from another table, click the Access button on the EXTERNAL DATA tab, in the Import & Link group. In the Get External Data - Access Database dialog box, Browse to the location where the second database is stored, and then double-click the file to be imported. In the Get External Data - Access Database dialog box, click the Link to the data source by creating a linked table option button, and then click OK. In the Link Tables dialog box, on the TABLES tab, click the name of the table to be linked, and then click OK. Changes made to the data in Access will be propagated to the source data and vice versa. If the source database requires a password, that password is saved with the linked table. You cannot make changes to the structure of the table in the linked table.
12
Export an Access Query to Word
You can export a table, query, form, or report to Word Exporting is the process used to send out a copy of data from one source or application to another application. You can then the Word document rather than the entire database. Exporting to Word is also helpful if you have a table that you want to format more than you can in an Access table. When you export an Access object, the Export Wizard creates a copy of the object’s data in a Microsoft Word Rich Text Format file; an extension of .rtf is used. Hidden fields are not exported with tables, queries, and forms; visible fields and records display as a table in the Word document. When you export a report, the Export Wizard copies the report data and the design layout, making the Word document resemble the report as closely as possible. To export an object to Word 2016, open the database that contains the object. The database must be open in Access to perform the export operation because there is no Access import feature in Word. To export a query, in the Navigation Pane, under Queries, right-click the query you are exporting, point to Export, and then click Word RTF File. In the Export - RTF File dialog box, click Browse. Navigate to the location that you will store your RTF file, name the file, and then click Save. The Export - RTF File dialog box displays, which enables you to select the destination for the data you want to export. Because the Export Wizard always exports formatted data, this option is selected and inactive. An option is available to display the Word document after the export operation is complete. The last selection—Export only the selected records—is inactive. To export some of the records, before you begin the export operation, open the object and select the records.
13
Export an Access Report to Word
Another example of exporting an Access object into Word is exporting an Access Report. To export an Access Report to Word, in the Navigation Pane, under Reports, right-click the report you want exported, point to Export, and then click Word RTF File. Verify that the File name box displays the correct path to the folder in which you will save your file. In the File name box, type a name for your RTF file, click the Open the destination file after the export operation is complete check box, and then click OK. A message box displays, and then the document opens in Word. Although all of the data is exported, it is not aligned as nicely as it was in the Access report. You would probably want to do some further formatting in Word. All of the data is separated by tabs.
14
Use Mail Merge to Integrate Access and Word
Using Word’s mail merge feature, letters or memos are created by combining, or merging, two documents, a main document and a data source. The main document contains the text of a letter or memo. The data source, an Access table or query, contains the names and addresses of the individuals to whom the letter, memo, or other document is being sent. Use the Mail Merge Wizard within Access to create a direct link between the table or query and the Word document. To merge an Access table or query with a Word document, click to select the table that contains the records to be merged in the Navigation Pane. On the EXTERNAL DATA tab, in the Export group, click the Word Merge button. The Microsoft Word Mail Merge Wizard starts. In the first dialog box, you can link the data in the table to an existing Word document or create a new Word document, and then link the data in the table to the new document. Verify that Link your data to an existing Microsoft Word document is selected, and then click OK. In the Select Microsoft Word Document dialog box, navigate to the location where the main document is located and open the file. Click the Microsoft Word button on the taskbar to view the document. Microsoft Word opens with the main document on the left and the Mail Merge Pane on the right. Continue following the steps in the Mail Merge Pane to merge your main document and the Access data source.
15
Export Selected Records to Excel
You can copy data from an Access database into a worksheet by exporting a table, form, or query to an Excel workbook; however, you cannot export reports, macros, or modules to Excel. When you export a table or form that contains subdatasheets or subforms, only the main datasheet or main form is exported. You can export only one database object in a single export operation; however, you can merge the data in multiple worksheets in Excel after completing the individual export operations. Export data to Excel if users share the data and some work with Access while others work with Excel. You can store the data in Access, and then export it to Excel to analyze the data. To export selected records from an Access query to an Excel workbook in the Navigation Pane, under Queries, double-click to run your query and to display the results. On the EXTERNAL DATA tab, in the Export group, click Excel. Follow the steps in the displayed Export - Excel Spreadsheet dialog box specifying a file name and export options. Excel opens and displays the exported data in a worksheet within the workbook. The worksheet name is the same as the query from which the data was exported. The workbook name displays in the Excel window title bar.
16
Copying Selected Records to an Existing Excel Workbook
You can also export selected records from an Access query to an Excel workbook by copying and pasting the records. In the datasheet, filter the table and select all of the records needed. On the HOME tab, in the Clipboard group, click the Copy button. On the taskbar, click the Microsoft Excel button to make the Excel window active. With cell A1 selected, on the HOME tab, in the Clipboard group, click the Paste button. You can copy data from one Access database into another Access database. Copying and pasting is easiest, but exporting offers you more options. You can export all of the database objects into another database. However, to export selected records, you must copy and paste the records. Exporting an object to another database is similar to importing the object from the first database, although you cannot export multiple objects in a single operation. To export multiple objects, it is easier to open the destination database and perform an import operation. You cannot export table relationships, import and export specifications, custom menu bars, custom toolbars, or a query as a table.
17
Export a Report to an HTML File
To display an Access object on a webpage, you can export the object to an HTML format. HyperText Markup Language is the language used to display webpages. Webpages are text files that contain text and codes known as tags that the web browser interprets as the page is loaded. A tag begins with the < character and ends with the > character; for example, to apply bold formatting to the word Access, you would add a beginning and an ending tag to the word: <b>Access</b>. The <b> tag identifies where the bold formatting begins. The </b> tag identifies where the bold formatting ends. To export an Access report to an HTML file, in the Navigation Pane, under Reports, right-click the report needed, point to Export, and then click HTML Document. Follow the steps in the displayed Export - HTML Document dialog box to name the file and specify the export options. The document displays in Microsoft Internet Explorer or in your default web browser.
18
Export a Report to an XML File
XML, Extensible Markup Language, is the standard language for describing and delivering data on the web. Similar to HTML, XML uses tags to organize and present data. Unlike HTML, which uses standard tags, XML enables you to create your own set of tags. With an XML document, the data can be displayed on a webpage, included in a Word document, analyzed in Excel, imported into a different database, or imported into many other programs that recognize XML files. To export an Access report to an XML file, right-click the report in the Navigation Pane, under Reports, point to Export, and then click XML File. Follow the steps in the displayed Export - XML File dialog box specifying a file name. The Export XML dialog box displays. When you export data to XML, multiple files can be created. An XML schema is a document with an .xsd extension that defines the elements, entities, and content allowed in the document. It defines the tag names and defines the order, relationships, and data type you use with each tag. The schema is essential to ensure that all of the table relationships and data types are preserved when the data is imported into another database. An XML file cannot be viewed directly in a web browser. XML presentation files can be created so that the data can be viewed in a web browser. If you have data in your Access database that you would like to export to other applications, explore the options on the External Data tab, in the Export group. Objects can be shared with others as a PDF document or by ing them in a format that the recipient can view and use. These export options do not require the recipient to have Access or any other database software. In the Export group, click More for additional export formats. A SharePoint List, as you recall, is a list of documents maintained on a server running Microsoft Office SharePoint Server. You also can export data to other database applications, such as ODBC databases. Recall that ODBC stands for Open Database Connectivity, a standard that enables databases using SQL statements to interface with one another.
19
Summary Importing is the process of copying data in from another application. Linking is the process of connecting to data in another application. Exporting is the process of copying data to another. Access objects can be exported to HTML and XML files. Importing is the process of copying data from another application. For example, a Word table can be converted to a text file for import, or data can come from an Excel worksheet or another database. Linking is the process of connecting to data in another application. If a table exists in another database, it can be linked to share the table in the original database. Exporting is the process of copying data to another application to use its features. For example, an Access query can be exported to perform a mail merge or selected records can be exported to Excel. Access objects can be exported to HTML and XML files, formats used for viewing webpages. From File Explorer, files are opened using a web browser; however, the formatting differs from the Access report.
20
Questions ?
21
Copyright All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.