access 2007 vba bible phần 6

Chọn "Sao lại kết thúc cơ sở dữ liệu" lệnh chất chiết xuất từ tên của cơ sở dữ liệu kết thúc trở lại từ chuỗi kết nối của một bảng liên kết, và trình bày một InputBox với một tên lưu đề xuất, có thể chỉnh sửa như mong muốn. InputBox được thể hiện trong hình | Working with External Data 10 Case 1 HTML transfertype acImportHTML _ TableName strTable _ FileName strHTMLXMLFileAndPath _ hasfieldnames True Assign the appropriate form as the subform s source object. Me subNewJobs .SourceObject fsubNewJobs Case 2 XML ImportXML DataSource strHTMLXMLFileAndPath _ importoptions acStructureAndData False There is no argument for specifying the name of the table that is created when an XML file is imported it comes in as the name stored in the XML file usually the XML file name possibly with a number added on. newname strTable objecttype acTable _ oldname strHTMLXMLFile Assign the appropriate form as the subform s source object. Me subNewJobs .SourceObject fsubNewJobs End Select ErrorHandlerExit Exit Sub ErrorHandler MsgBox Error No _ Description Resume ErrorHandlerExit End Sub Exporting HTML and XML Files If you want to experiment with exporting Access data to HTML or XML files try the Export Job Data to HTML or XML File form. If you select the Export HTML or XML Data option on the main menu see Figure and click the button to its left the Export Job Data to HTML or 341 Part II Writing VBA Code to Exchange Data between Office Components XML File frmExportHTMLXMLData form will open as shown in Figure . The form has From Date and To Date textboxes for specifying a date range clicking the Inspect New Jobs to Export button loads the subform with the records from the selected date range. FIGURE Inspecting the filtered job records to export to an HTML or XML file. Clicking the Export Jobs to HTML File button or Export Jobs to XML File the caption changes with the selection in the Export File Type option group starts the export. The HTML export is done with the TransferText method with the acExportHTML value for the TransferType argument the XML export is done with the ExportXML method of the Access Application object. Figure shows an .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
1    368    3    02-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.