<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yadUK - Effective Information System Solutions &#187; access</title>
	<atom:link href="http://www.yaduk.co.uk/tag/access/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yaduk.co.uk</link>
	<description>Effective Information System Solutions</description>
	<lastBuildDate>Thu, 01 Apr 2010 18:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Export Access to Excel with Custom Headers</title>
		<link>http://www.yaduk.co.uk/2009/07/20/export-access-to-excel-with-custom-headers/</link>
		<comments>http://www.yaduk.co.uk/2009/07/20/export-access-to-excel-with-custom-headers/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 11:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=359</guid>
		<description><![CDATA[<p>Have you noticed how the &#8220;out the box&#8221; solution to export your dataset from MS Access to MS Excel doesn&#8217;t give much room to give custom headers to your worksheet?</p>
<p>Through utlising ActiveX you can instantiate a copy of MS Excel in memory to add in your own custom headers&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Have you noticed how the &#8220;out the box&#8221; solution to export your dataset from MS Access to MS Excel doesn&#8217;t give much room to give custom headers to your worksheet?</p>
<p>Through utlising ActiveX you can instantiate a copy of MS Excel in memory to add in your own custom headers etc. prior to exporting your MS Access dataset into the worksheet.</p>
<p>The below code example shows you how to add 5 custom headers to your sheet. Just add in your own SQL query where it is indicated.</p>
<textarea cols="40" rows="10" name="code" class="Vb">Private Sub btn_export_excel_Click()
   
    Dim mySQL, thepos, theleft, theright, test As String
    Dim i, iNumCols  As Integer
    Dim DB As DAO.Database
    Dim rs As DAO.Recordset
    
    Set DB = CurrentDb
    
    With Me.yourformname.Form.RecordsetClone
        If .RecordCount > 0 Then .MoveLast
        test = .RecordCount
    End With
    
    If test < 65535 Then
        'create output table and output
        If MsgBox("Export selected data?", vbOKCancel, "Export . . ?") = vbOK Then
            
            Dim oApp As New Excel.Application
            Dim oBook As Excel.Workbook
            Dim oSheet As Excel.Worksheet
            Dim oRange As Excel.Range
			
			mySQL = "enter in whatever youSQL query is here"
                  
            Set rs = DB.OpenRecordset(mySQL, dbOpenSnapshot)
            Set oBook = oApp.Workbooks.Add
            Set oSheet = oBook.Worksheets(1)
            
            oSheet.Cells(1, 1).Value = "HEADER 1"
            oSheet.Cells(2, 1).Value = "HEADER 2"
            oSheet.Cells(3, 1).Value = "HEADER 3"
            oSheet.Cells(4, 1).Value = "HEADER 4"
            oSheet.Cells(5, 1).Value = "HEADER 5"
            
            'Format the header
            oSheet.Cells(1, 1).Font.Bold = True
            
            With oSheet
                Set oRange = .Range("A5:AL5")
            End With
            
            With oRange
                .MergeCells = True
            End With
           
            'Add the field names in row 7
            iNumCols = rs.Fields.count
            For i = 1 To iNumCols
                oSheet.Cells(7, i).Value = rs.Fields(i - 1).Name
            Next
            
            'Add the data starting at cell A8
            oSheet.Range("A8").CopyFromRecordset rs
            
            'Format the header row as bold and autofit the columns
            With oSheet.Range("a7").Resize(1, iNumCols)
                .Font.Bold = True
                .EntireColumn.AutoFit
            End With
            oSheet.Columns("A:A").ColumnWidth = 10.14
            
            oApp.Visible = True
            oApp.UserControl = True
            
            'make sure we clean up the instantiated Excel app!!
            'oApp.Quit
            Set oApp = Nothing
            Set oBook = Nothing
            Set oSheet = Nothing
            rs.Close
            DB.Close
            
        End If
    Else
        MsgBox "Sorry - your export is larger than what can be held within Excel!" & vbCrLf & vbCrLf & " Please consider revising your dataset.", vbCritical, "Export Error"
    End If
    
End Sub</textarea>
	<!-- WordPress Code Snippet -->
	<script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shCore.js"></script><script type="text/javascript" src="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/shBrushVb.js"></script>
	<link type="text/css" rel="stylesheet" href="http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/css/SyntaxHighlighter.css"/>
	
	<script language="javascript">
	dp.SyntaxHighlighter.ClipboardSwf = 'http://www.yaduk.co.uk/wp-content/plugins/wordpress-code-snippet/js/clipboard.swf';
	dp.SyntaxHighlighter.HighlightAll('code');
	</script>
	<!-- End WordPress Code Snippet -->
	<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2009/07/20/export-access-to-excel-with-custom-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HBOS: Corporate Finance &amp; Planning &#8211; 1</title>
		<link>http://www.yaduk.co.uk/2007/11/01/hbos-corporate-finance-planning-1/</link>
		<comments>http://www.yaduk.co.uk/2007/11/01/hbos-corporate-finance-planning-1/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 19:58:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[corporate]]></category>

		<guid isPermaLink="false">http://www.yaduk.co.uk/?p=27</guid>
		<description><![CDATA[<h3>Intranet development and client-side web enabled applications development.</h3>
<p>Excellent contract involving many differing Information System (IS) processes to achieve final products.</p>
<p>Client-side web application utilising Internet Explorers Data Island technology to hold source and data bind dynamically built resultant data for on-screen viewing. Heavy use of JavaScript to build dynamic&#8230;</p>]]></description>
			<content:encoded><![CDATA[<h3>Intranet development and client-side web enabled applications development.</h3>
<p>Excellent contract involving many differing Information System (IS) processes to achieve final products.</p>
<p>Client-side web application utilising Internet Explorers Data Island technology to hold source and data bind dynamically built resultant data for on-screen viewing. Heavy use of JavaScript to build dynamic search drop-downs and to traverse the DOM of an XML source document held within a source XML Data Island. </p>
<p>Utilised JScript to traverse the dynamic result display for exporting via ActiveX to Microsoft Excel. XML Source document built from 6+ Business Objects reports output; manipulated; cleaned; and combined within a bespoke MS Access database before exported to XML.</p>
<p>Creation of a Intranet &#8220;Portal&#8221; for the Business Intelligence department within Corporate Finance &amp; Planning.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.yaduk.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.yaduk.co.uk/2007/11/01/hbos-corporate-finance-planning-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
