<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Microsoft Access Team Blog</title><subtitle type="html">Get product announcements, tips and tricks, and news directly from the team @ Microsoft.</subtitle><id>http://blogs.msdn.com/access/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/access/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-10-07T00:03:30Z</updated><entry><title>Displaying Data From Related Tables on a Form</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/11/06/displaying-data-from-related-tables-on-a-form.aspx" /><id>http://blogs.msdn.com/access/archive/2009/11/06/displaying-data-from-related-tables-on-a-form.aspx</id><published>2009-11-06T22:12:58Z</published><updated>2009-11-06T22:12:58Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Today's guest blogger is Access MVP Scott Diamond. Scott is the principal of &lt;/strong&gt;&lt;a href="http://www.diamondassoc.com/"&gt;&lt;strong&gt;Diamond Computing Associates&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; and the author of &lt;/strong&gt;&lt;a href="http://www.informit.com/store/product.aspx?isbn=0789737310"&gt;&lt;strong&gt;Microsoft Office Access 2007 VBA&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;This is a very frequently discussed issue. But before I get into the methods, you need to understand one of the principles of relational databases. That principle is that data should exist in one place only. Having the same data in multiple tables is a violation of normalization. Related records are indicated by a Foreign Key within the record that holds the Primary Key value of the parent record. So when you want to have data from multiple tables on a data entry form, you set it up to display the data not store it in the form’s &lt;a href="http://msdn.microsoft.com/en-us/library/bb216003.aspx"&gt;RecordSource&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There are basically four ways to display related data on a form; Subforms, the Column property, DLookups and Listboxes. Ill discuss each in turn and suggest where to use each.&lt;/p&gt;  &lt;h4&gt;Subforms&lt;/h4&gt;  &lt;p&gt;You can use a subform to display several fields from the related table. Create the form using the Subform wizard or create a separate form and place it on the main form as a subform (I generally create a separate form). Using the wizard, you go through the following steps.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Select whether to use an existing form or create a new one &lt;/li&gt;    &lt;li&gt;If you are creating select the table and fields to use &lt;/li&gt;    &lt;li&gt;Select the linking fields, usually accept the defaults Access proposes &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You can customize the subform, so it looks like part of the main form, by removing record selectors, navigation buttons, borders etc. I use subforms when I want to display 4 or more fields from the related record. Another advantage of using subforms is where you have a One to Many relation. Using a Continuous Form or Datasheet View, you can display multiple related records at once.&lt;/p&gt;  &lt;h4&gt;Column Property&lt;/h4&gt;  &lt;p&gt;Generally Foreign Keys are entered by selecting the related value from a combobox. The combobox uses a query as it Rowsource. This query displays the records from that parent table. At the least, the query includes the primary key field as its bound column and a description field. However, you can add as many other fields from the table as you want. These fields can then be reference using the Column property. Click the Build button […] next to the Rowsource property to enter Query Design Mode. In Query Design Mode you can add tables and fields to the query. You can control what fields actually display in the pull down list by setting their Column Width. Setting the width of an individual column to 0&amp;quot; will hide that column (Note: Column widths are entered separated by a ; for each column listed in the column Count). The combobox will only display the first non zero length column after selection. The following properties of a combo are key to using combos in this way: RowSource (the list), Bound column (what's actual stored), Column Count (how many columns in the list, Column Widths (the size of each column in the list).&lt;/p&gt;  &lt;p&gt;You can then set the ControlSource for an unbound control to:&lt;/p&gt;  &lt;p&gt;[comboxname].Column(x)&lt;/p&gt;  &lt;p&gt;Where comboxname is the name of the control and x is the number of the column in the query for that field. Note: the column count starts with 0 so the 3rd column is 2.&lt;/p&gt;  &lt;p&gt;Since the combobox selects a single record, the Column property will also reflect a single record. I use this method if I need to display 3 or less values from the related record.&lt;/p&gt;  &lt;h4&gt;DLookups&lt;/h4&gt;  &lt;p&gt;DLookups allow you pull a value from a field in a specific record. It uses the syntax: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb148913.aspx"&gt;DLookup&lt;/a&gt;([fieldname],table/queryname,Criteria). &lt;/p&gt;  &lt;p&gt;The Criteria is used to specify the record you want to return. Since the Comboxname will store the Foreign Key value you would use a criteria like: &lt;/p&gt;  &lt;p&gt;[keyfield] = &amp;amp; [Comboboxname]. &lt;/p&gt;  &lt;p&gt;This would also be used as the controlsource of an unbound control. Each DLookup should only be returning data from a single record. If its possible that the DLookup might not find a matching record you should use it within a NZ (NullZero) function to prevent errors. I use DLookups when I need to pull data from different tables based on a key value.&lt;/p&gt;  &lt;h4&gt;Listboxes&lt;/h4&gt;  &lt;p&gt;A Listbox can have multiple columns with column headers. It also can be set to display multiple matching records. I will, sometimes, use a Listbox in place of a continuous form or datasheet subform. Listboxes will also display multiple matching records.&lt;/p&gt;  &lt;p&gt;There are two exceptions to the rule of not repeating data in multiple tables. The first is the PK value. Obviously, that value has to be repeated as the FK to relate the records to each other. The other exception is time sensitive data. Sometimes you need to freeze data that will change over time. The best example of this is price data. For example: In an order entry application, you want to freeze the price at the time of the order. In such a case, you would have the Price field repeated in the OrderDetails table. Generally you would use the Column property for this and populate the control in the After Update event of the Products combo use code like:&lt;/p&gt;  &lt;p&gt;Me.txtPrice = Me.cboProduct.Column(2)&lt;/p&gt;  &lt;p&gt;These guidelines should help you build forms that preserve normalization and are well organized and easy for the user to use.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918857" width="1" height="1"&gt;</content><author><name>Mike Stowe</name><uri>http://blogs.msdn.com/members/Mike+Stowe.aspx</uri></author><category term="Form" scheme="http://blogs.msdn.com/access/archive/tags/Form/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>A better way to reference tab control pages</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/11/05/a-better-way-to-reference-tab-control-pages.aspx" /><id>http://blogs.msdn.com/access/archive/2009/11/05/a-better-way-to-reference-tab-control-pages.aspx</id><published>2009-11-06T02:38:54Z</published><updated>2009-11-06T02:38:54Z</updated><content type="html">&lt;p&gt;In VBA, a common way to refer to the pages of a tab control is to use the &lt;strong&gt;Value&lt;/strong&gt; property. However, Luke Chung, President of FMS Inc., recommends using the &lt;strong&gt;PageIndex&lt;/strong&gt; property instead. &lt;a href="http://www.fmsinc.com/microsoftaccess/forms/tabs"&gt;Click here&lt;/a&gt; to find out why! &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/Abetterwaytoreferencetabcontrolpages_1063A/tabs_4.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tabs" border="0" alt="tabs" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/Abetterwaytoreferencetabcontrolpages_1063A/tabs_thumb_1.jpg" width="504" height="275" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h6&gt;Send your Power Tips to Mike and Chris at &lt;a href="mailto:accpower@microsoft.com"&gt;accpower@microsoft.com&lt;/a&gt;.&lt;/h6&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918357" width="1" height="1"&gt;</content><author><name>cdowns</name><uri>http://blogs.msdn.com/members/cdowns.aspx</uri></author><category term="User Interface" scheme="http://blogs.msdn.com/access/archive/tags/User+Interface/default.aspx" /><category term="Form" scheme="http://blogs.msdn.com/access/archive/tags/Form/default.aspx" /><category term="Code" scheme="http://blogs.msdn.com/access/archive/tags/Code/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>Access featured on MSNZ Podcast</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/11/04/access-featured-on-msnz-podcast.aspx" /><id>http://blogs.msdn.com/access/archive/2009/11/04/access-featured-on-msnz-podcast.aspx</id><published>2009-11-04T16:49:02Z</published><updated>2009-11-04T16:49:02Z</updated><content type="html">&lt;p&gt;&lt;a href="http://burling.co.nz/post/MSNZ-Podcast-8-e28093-Access-Services-for-SharePoint.aspx"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image[1]" border="0" alt="image[1]" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/AccessfeaturedonMSNZPodcast_7BFC/image%5B1%5D_3.jpg" width="260" height="117" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Johanna and I were invited to do an interview for the &lt;a href="http://burling.co.nz/post/MSNZ-Podcast-8-e28093-Access-Services-for-SharePoint.aspx"&gt;MSNZ podcast&lt;/a&gt; at the &lt;a href="http://www.mssharepointconference.com/Pages/default.aspx"&gt;SharePoint Conference&lt;/a&gt;. It just got posted, hope you enjoy it :)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9917401" width="1" height="1"&gt;</content><author><name>Ryan McMinn</name><uri>http://blogs.msdn.com/members/Ryan+McMinn.aspx</uri></author></entry><entry><title>Demo of Access 2010 room bookings database</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/11/03/demo-of-access-2010-room-bookings-database.aspx" /><id>http://blogs.msdn.com/access/archive/2009/11/03/demo-of-access-2010-room-bookings-database.aspx</id><published>2009-11-03T19:21:03Z</published><updated>2009-11-03T19:21:03Z</updated><content type="html">&lt;p&gt;Albert D. Kallal (Access MVP) has published a great &lt;a href="http://www.members.shaw.ca/MrTurtle/2010d1/w1.html"&gt;video demo of an application that he build for tracking meetings rooms&lt;/a&gt;. He even has built a fancy calendar control that renders in the web using data macros and bound controls. it is a good example of the types of things you can do in the browser with Access + Access Services. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/DemoofAccess2010roombookingsdatabase_9F9B/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/DemoofAccess2010roombookingsdatabase_9F9B/image_thumb.png" width="244" height="162" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here is my favorite quote from the video:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;I find this new table level programming model encourages designs that allow you to quickly react to your changing business needs. You can likely change your application in less time than it takes to have a meeting with your web and database development team. In fact, with Access I don’t think you need that team anymore.&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Nice work Albert!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9916914" width="1" height="1"&gt;</content><author><name>Clint Covington</name><uri>http://blogs.msdn.com/members/Clint+Covington.aspx</uri></author><category term="Access 2010" scheme="http://blogs.msdn.com/access/archive/tags/Access+2010/default.aspx" /><category term="2010 Intro Series" scheme="http://blogs.msdn.com/access/archive/tags/2010+Intro+Series/default.aspx" /></entry><entry><title>Why VBA still makes sense</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/28/why-vba-still-makes-sense.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/28/why-vba-still-makes-sense.aspx</id><published>2009-10-29T04:52:38Z</published><updated>2009-10-29T04:52:38Z</updated><content type="html">&lt;p&gt;John Durant from the Office Developer marketing team is blogging about &lt;a href="http://blogs.msdn.com/johnrdurant/archive/2009/09/07/why-vba-still-makes-sense.aspx"&gt;why VBA still makes sense&lt;/a&gt;. I expect the Access community is interested in what he has to say. Here is a little taste of the article:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;Not infrequently I am asked, “So, should I use VBA? Is it going to be around in Office 2010? Is it supported? Should I migrate away from VBA now? Can I count on this technology?” (Here I go with a response!)&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;These are fair questions, because customers need to know that the software systems they employ are ones they can count on. There’s no question that the IT landscape in terms of teams, tools, software, networks, and so forth have changed dramatically since 1993, when VBA, or Visual Basic for Applications, made its way into Excel. But, VBA still has a place in this world. It still makes sense, and I’ll explain why.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;First, here are some answers: 1) VBA is included in Office 2010 much as it was in Office 2007. 2) It is indeed supported 3) You should continue to use VBA where it fits the needs of our business and migrate only if the need arises.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;Let me elaborate on #3 a little more, because it is the locus of most questions and issues.&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;&lt;em&gt;…&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9914514" width="1" height="1"&gt;</content><author><name>Clint Covington</name><uri>http://blogs.msdn.com/members/Clint+Covington.aspx</uri></author></entry><entry><title>Convert hexadecimal color codes so you can use them in code</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/26/convert-hexadecimal-color-codes-so-you-can-use-them-in-code.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/26/convert-hexadecimal-color-codes-so-you-can-use-them-in-code.aspx</id><published>2009-10-26T15:14:08Z</published><updated>2009-10-26T15:14:08Z</updated><content type="html">&lt;h5&gt;Today's guest blogger is Michael Merlin, Lead Software Developer at &lt;a href="http://ecoms.com" target="_blank"&gt;Electronic Communities&lt;/a&gt;. &lt;/h5&gt;  &lt;p&gt;I recently wasted an hour trying to set a field's Back Color property to the hex code generated by the color picker. I figured it out after some searching, but still nobody online had the exact correct answer. I wrote a function that lets you easily use the hex color in code. The secret is to swap the R and the B, and then convert the hex to long. Further explanation follows in the comments of the function.&lt;/p&gt;  &lt;p&gt;Cheers!    &lt;br /&gt;Michael&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt; HexColor(strHex &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;) &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Long&lt;/span&gt;

    &lt;span class="rem"&gt;'converts Hex string to long number, for colors&lt;/span&gt;
    &lt;span class="rem"&gt;'the leading # is optional&lt;/span&gt;

    &lt;span class="rem"&gt;'example usage&lt;/span&gt;
    &lt;span class="rem"&gt;'Me.iSupplier.BackColor = HexColor(&amp;quot;FCA951&amp;quot;)&lt;/span&gt;
    &lt;span class="rem"&gt;'Me.iSupplier.BackColor = HexColor(&amp;quot;#FCA951&amp;quot;)&lt;/span&gt;

    &lt;span class="rem"&gt;'the reason for this function is to programmatically use the&lt;/span&gt;
    &lt;span class="rem"&gt;'Hex colors generated by the color picker.&lt;/span&gt;
    &lt;span class="rem"&gt;'The trick is, you need to reverse the first and last hex of the&lt;/span&gt;
    &lt;span class="rem"&gt;'R G B combination and convert to Long&lt;/span&gt;
    &lt;span class="rem"&gt;'so that if the color picker gives you this color #FCA951&lt;/span&gt;
    &lt;span class="rem"&gt;'to set this in code, we need to return CLng(&amp;amp;H51A9FC)&lt;/span&gt;
    
    &lt;span class="kwrd"&gt;Dim&lt;/span&gt; strColor &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;
    &lt;span class="kwrd"&gt;Dim&lt;/span&gt; strR &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;
    &lt;span class="kwrd"&gt;Dim&lt;/span&gt; strG &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;
    &lt;span class="kwrd"&gt;Dim&lt;/span&gt; strB &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;
    
    &lt;span class="rem"&gt;'strip the leading # if it exists&lt;/span&gt;
    &lt;span class="kwrd"&gt;If&lt;/span&gt; Left(strHex, 1) = &lt;span class="str"&gt;&amp;quot;#&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;Then&lt;/span&gt;
        strHex = Right(strHex, Len(strHex) - 1)
    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;
    
    &lt;span class="rem"&gt;'reverse the first two and last two hex numbers of the R G B values&lt;/span&gt;
    strR = Left(strHex, 2)
    strG = Mid(strHex, 3, 2)
    strB = Right(strHex, 2)
    strColor = strB &amp;amp; strG &amp;amp; strR
    HexColor = &lt;span class="kwrd"&gt;CLng&lt;/span&gt;(&lt;span class="str"&gt;&amp;quot;&amp;amp;H&amp;quot;&lt;/span&gt; &amp;amp; strColor)

&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Function&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;


.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9912963" width="1" height="1"&gt;</content><author><name>cdowns</name><uri>http://blogs.msdn.com/members/cdowns.aspx</uri></author><category term="Report" scheme="http://blogs.msdn.com/access/archive/tags/Report/default.aspx" /><category term="User Interface" scheme="http://blogs.msdn.com/access/archive/tags/User+Interface/default.aspx" /><category term="Form" scheme="http://blogs.msdn.com/access/archive/tags/Form/default.aspx" /><category term="Code" scheme="http://blogs.msdn.com/access/archive/tags/Code/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>Running an Access Parameter Query from Excel</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/23/running-an-access-parameter-query-from-excel.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/23/running-an-access-parameter-query-from-excel.aspx</id><published>2009-10-23T08:56:00Z</published><updated>2009-10-23T08:56:00Z</updated><content type="html">&lt;p&gt;Excel MVP Michael Alexander wanted to share this tip about running an Access parameter query from Excel. He describes the problem thusly:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;An Access parameter query is a kind of interactive query that prompts you for criteria before the query is run. Parameter queries are useful when you need to ask the query different questions using different criteria each time you run it.&lt;/p&gt;    &lt;p&gt;Now we all know you can pull data from Access into Excel using MS Query. The problem is that MS Query doesn't let you pull in Parameter queries. There may be a technical reason for this, but I like to think it's just Microsoft's way of keeping things interesting. After all, technical roadblocks are the spice of life.      &lt;br /&gt;If you've had enough spice, I'll show you a VBA workaround that will enable you to run an Access parameter query from Excel.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://datapigtechnologies.com/blog/index.php/running-an-access-parameter-query-from-excel/"&gt;Click over to Michael’s blog&lt;/a&gt; to learn about his solution to the problem.&lt;/p&gt;  &lt;h6&gt;Send your Power Tips to Mike and Chris at &lt;a href="mailto:accpower@microsoft.com"&gt;accpower@microsoft.com&lt;/a&gt;.&lt;/h6&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911866" width="1" height="1"&gt;</content><author><name>Mike Stowe</name><uri>http://blogs.msdn.com/members/Mike+Stowe.aspx</uri></author><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>.Net developer blogs about Access 2010</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/21/net-developer-blogs-about-access-2010.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/21/net-developer-blogs-about-access-2010.aspx</id><published>2009-10-21T23:36:34Z</published><updated>2009-10-21T23:36:34Z</updated><content type="html">Today’s guest writer is Richard Fennell from Black Marble. Richard is engineering director for Black Marble, hard core .NET developer, and MVP for Team Systems. Black Marble does a lot of custom SharePoint development and sell few accelerator kits. Black Marble is active in the community sponsoring regular .Net developer and SharePoint conferences and workshops. They have worked closely with our team over the last couple months as part of the Office 2010 Technical Adoption Program.&amp;#160; &lt;p&gt;Richard is not someone you would call an avid Access developer. He recently wrote about his experience building an Access application on SharePoint. I have reposted his article here with his permission.&lt;/p&gt;  &lt;p&gt;Clint&lt;/p&gt;  &lt;p&gt;____&lt;/p&gt;  &lt;h3&gt;Access Services in SharePoint 2010 or: How I Learned to Stop Worrying and Love Access 2010&lt;/h3&gt;  &lt;p&gt;&lt;a title="http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2009/10/19/access-services-in-sharepoint-2010-or-how-i-learned-to-stop-worrying-and-love-access-2010.aspx" href="http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2009/10/19/access-services-in-sharepoint-2010-or-how-i-learned-to-stop-worrying-and-love-access-2010.aspx"&gt;http://blogs.blackmarble.co.uk/blogs/rfennell/archive/2009/10/19/access-services-in-sharepoint-2010-or-how-i-learned-to-stop-worrying-and-love-access-2010.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So what I have I been doing of late? The blog has been a bit quiet. Well I have been having a good look at Access Services in SharePoint 2010. This has been an interesting experience, as I am not historically what you might call an avid Access developer. &lt;/p&gt;  &lt;p&gt;Like most .NET developers, I had looked at Access as more of a file format than an application, something from the past. Something that I might use for a small data store, maybe in a web application hosted on a cheaper ISP that does not provide ‘a real’ SQL DB, or where an XML data files don’t seem right, often because I just can’t be bothered to work out the XPATH. When using Access as a data format it seems easier to get at my data using basic hand crafted SQL commands or maybe at most via a OLEDB Data Adaptor/DataSet. All very old, old school. Thinking about Access in this way just seems an easy way out, playing it safe with the knowledge I have. I don’t for a second propose that this is a good idea. You should not be looking at using any technology just because it is there and you already know it. There are obvious downsides, using Access in this manner meant that from the ADO.NET developer side I could not:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;make use of the newer &lt;a href="http://msdn.microsoft.com/en-us/library/bb397687.aspx"&gt;lambda expression&lt;/a&gt; based syntax of &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx"&gt;LINQ&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;make use of newer &lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping"&gt;ORM solutions&lt;/a&gt; such as &lt;a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx"&gt;Entity Framework&lt;/a&gt; or &lt;a href="http://nhforge.org/Default.aspx"&gt;nHibernate&lt;/a&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But equally, by treating Access as just a data format I was not able to make use of it as the Rapid Development tool it is. I was too hung up in the unpleasant idea of an MDB sitting of a server being poor at locking and saturating the network with unwanted traffic. I was not even considering Access as a front end to a MS-SQL solution, and it is not as if that is new technology, it has been around for ages. I was just sitting happily with my prejudices. &lt;/p&gt;  &lt;p&gt;I don’t think this position is that rare for .NET developers these days. Access seems just looked down upon as something old in the Office pack that is best ignored, and no good would come of using it in a business environment.&lt;/p&gt;  &lt;p&gt;So enters &lt;a href="http://www.mssharepointconference.com"&gt;Office 2010 and SharePoint 2010 Access Services&lt;/a&gt;. For me this changes the game. For those who don’t know this technology, you can create an Access database locally on your PC then publish it to SharePoint. Tables become SharePoint lists, macros become workflows and forms become forms. Access becomes a RAD tool to create data driven SharePoint sites. &lt;/p&gt;  &lt;p&gt;So how has this new technology been working for me? Well I can’t say I have grown to love the Access client, but I think that is mostly down to that fact that I am still not thinking right for it. Access is all about data binding. You don’t have to think about what form fields need to be copied to which DB columns, and the wizards make a really good attempt to design forms for you based on the relationship of the tables in your DB. This just all seem unnatural to me. I think this is because I am usually working with design patterns to reduce the linkage between forms and data to a minimum (e.g. the MVC pattern), and so consider this good practice; automated data binding seems wrong. So in Access, I want to build things from first principles, but this is just not sensible. Better to let the tool get you close and then you add the polish, and put away any thoughts of implementing design patterns as you would in a language such as C# or VB.NET. &lt;/p&gt;  &lt;p&gt;I think this is the key to the degree of irritation I feel with the product, if you have got used to architecting from the ground up, especially in a Test Driven Development style, you have to turn everything on its head. It feels like you are cheating, and not doing the job properly. &lt;/p&gt;  &lt;p&gt;But wait! Look at the benefits. A while ago I was involved in a project to provide a resource management data-driven web site that was hosted within SharePoint. It contained the usual things--data entry forms, links to SQL and reports. It took a couple of weeks to build. I think I could write the same system in Access with SharePoint 2010 in an afternoon, and would be happy to have a client’s business analyst sit next to me while I did it, in a pair programming style, to design the forms, report layouts and columns as I went along. For the smaller scale data-driven site, Access Services is a great tool, but obviously it is not perfect. I do keep hitting points where I think ‘if I were in C# I could just do that,’ but then I remember, ‘yes, but it would have taken me three days to get there, not an hour’. Most projects don’t need that last 10-20% you can only reach on .NET custom code, and the client with be far happier with 80% done quickly and flexibly rather than 95% done later. Also we have to factor in my relative lack of experience with Access as a RAD tool, reducing the productivity that could potentially be achieved by a more experienced Access developer.&lt;/p&gt;  &lt;p&gt;Actually the bulk of the time I have spent has been on looking at how you can extend Access Services to reach that last 20% of functionality, and it not that hard. The key to remember is that the Access Services are just built on standard SharePoint objects. Ok, there is a new service running to render the pages, but underneath there are just SharePoint lists and workflow, and where these exist there are events that you can programmatically handle. I have found that by trapping events such as ItemAdd() for the Access-created SharePoint lists, there is no real limit to what you can achieve via the SharePoint Object Model. And this development process is made even easier by the new Visual Studio 2010 templates for SharePoint features. If nothing else the fact that all the templates create a WSP for deployment makes for far more robust feature development.&lt;/p&gt;  &lt;p&gt;There is one major difference between a standard SharePoint site and one created by Access, and it is that SharePoint Designer cannot open the Access site. I thought this would be an issue when I first heard about the limitation, but it turned out not to be. Anything you might have wanted to do in SharePoint Designer you can do quicker and easier in Access for this type of data-driven site. Ok the range of things you can do is more limited, but again you get that 80% you need with much less pain. &lt;/p&gt;  &lt;p&gt;So how has my experience with Access 2010 been? Exasperating, frustrating but undeniably productive. I am not sure it is the right product for an ISV style company who want to roll out a single solution to many client sites (but it could be used for this if needed via the SharePoint site template gallery); but for a smaller data driven site (with or without custom extensions) written within an IT department it is a very strong contender. Taking Access in many ways back to its roots. &lt;/p&gt;  &lt;p&gt;So if you need small data-driven sites I would suggest you put aside your prejudices and have a look at the beta program for Office/SharePoint 2010. I think you will be surprised.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Updated 10/22/2009 with minor grammar edits.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9911001" width="1" height="1"&gt;</content><author><name>Clint Covington</name><uri>http://blogs.msdn.com/members/Clint+Covington.aspx</uri></author></entry><entry><title>Expand only the subdatasheets you want</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/21/expand-only-the-subdatasheets-you-want.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/21/expand-only-the-subdatasheets-you-want.aspx</id><published>2009-10-21T15:43:00Z</published><updated>2009-10-21T15:43:00Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Today's guest blogger is Pavlo Pedan of ARGO Business Corp. He has 15 years of experience with Access and has a great site of tips&amp;#160; at &lt;/strong&gt;&lt;a href="http://sites.google.com/site/msaccesscode/"&gt;&lt;strong&gt;http://sites.google.com/site/msaccesscode/&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you have a form that contains subdatasheets, you can use the following VBA command to expand all of them:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Forms![FormName]![SubFormName].Form.SubdatasheetExpanded = True&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;However, we often want only &lt;em&gt;some&lt;/em&gt; of the subdatasheets to be expanded, based on     &lt;br /&gt;some criteria (for example - expand only if subdatasheets contain data.) &lt;/p&gt;  &lt;p&gt;Watch a short video demo and download a demo database &lt;a href="http://sites.google.com/site/msaccesscode/forms-1/expandonesubformlineindatasheetviewcriteriabased" target="_blank"&gt;from this page&lt;/a&gt;. Make sure you have added a reference to the &amp;quot;Accessibility&amp;quot; library (%windir%\system32\oleacc.dll). &lt;/p&gt;  &lt;p&gt;This has been tested on Access 2007.&lt;/p&gt;  &lt;h6&gt;Send your Power Tips to Mike and Chris at &lt;a href="mailto:accpower@microsoft.com"&gt;accpower@microsoft.com&lt;/a&gt;.&lt;/h6&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910662" width="1" height="1"&gt;</content><author><name>cdowns</name><uri>http://blogs.msdn.com/members/cdowns.aspx</uri></author><category term="User Interface" scheme="http://blogs.msdn.com/access/archive/tags/User+Interface/default.aspx" /><category term="Code" scheme="http://blogs.msdn.com/access/archive/tags/Code/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>Access Web Databases and The Access Show</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/19/access-web-databases-and-the-access-show.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/19/access-web-databases-and-the-access-show.aspx</id><published>2009-10-20T00:03:06Z</published><updated>2009-10-20T00:03:06Z</updated><content type="html">&lt;p&gt;There are a couple big announcements happening today for the Access community. In partnership with &lt;a href="http://channel9.msdn.com/"&gt;Channel 9&lt;/a&gt; we are launching a new show called &lt;a href="http://channel9.msdn.com/shows/Access/"&gt;The Access Show&lt;/a&gt;. It will feature Ryan McMinn, myself and others from the team. We will talk in-depth about what is new in Access 2010 and share feedback from the community. Additionally, at the &lt;a href="http://www.mssharepointconference.com/pages/default.aspx"&gt;SharePoint Developers Conference&lt;/a&gt; we are disclosing more details about Access Services. Access Services is a new SharePoint 2010 feature that allows users to create web databases in Access, host them on SharePoint, and available through a browser. &lt;/p&gt;  &lt;p&gt;Here is the inaugural episode and one of the first public demos of an Access Services application running in the browser:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/TheAccessShowonChannel9_13794/image_3.png" width="244" height="139" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/"&gt;http://channel9.msdn.com/shows/Access/Microsoft-Access-2010-Demo/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909550" width="1" height="1"&gt;</content><author><name>Clint Covington</name><uri>http://blogs.msdn.com/members/Clint+Covington.aspx</uri></author><category term="2010 Intro Series" scheme="http://blogs.msdn.com/access/archive/tags/2010+Intro+Series/default.aspx" /><category term="The Access Show" scheme="http://blogs.msdn.com/access/archive/tags/The+Access+Show/default.aspx" /></entry><entry><title>Mary Jo Foley writes about SharePoint</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/17/mary-jo-foley-writes-about-sharepoint.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/17/mary-jo-foley-writes-about-sharepoint.aspx</id><published>2009-10-17T14:29:28Z</published><updated>2009-10-17T14:29:28Z</updated><content type="html">&lt;p&gt;There is a good article by Microsoft watcher Mary Jo Foley about &lt;a href="http://blogs.zdnet.com/microsoft/?p=4262"&gt;SharePoint from a Microsoft’s business perspective&lt;/a&gt;. Some key points worth highlighting:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;SharePoint is the fastest growing server product at Microsoft contributing over $1 billion in revenue.&lt;/li&gt;    &lt;li&gt;There are approximately &lt;a href="http://blogs.msdn.com/sharepoint/archive/2009/10/11/engineering-sharepoint.aspx"&gt;40 teams and thousands of people&lt;/a&gt; that contribute to the product.&lt;/li&gt;    &lt;li&gt;The SharePoint conference in Las Vegas next week is sold out with more than 7,000 attendees.&lt;/li&gt;    &lt;li&gt;Elop talks about SharePoint as a developer platform that integrates with other back-end systems and business applications.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Mary Jo has plans over the next few days to publish a series of posts about what makes the product tick. I look forward to reading what she has to say.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9908565" width="1" height="1"&gt;</content><author><name>Clint Covington</name><uri>http://blogs.msdn.com/members/Clint+Covington.aspx</uri></author></entry><entry><title>Using the ShowToolbar Method to Hide the Ribbon</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/16/using-the-showtoolbar-method-to-hide-the-ribbon.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/16/using-the-showtoolbar-method-to-hide-the-ribbon.aspx</id><published>2009-10-16T21:31:29Z</published><updated>2009-10-16T21:31:29Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Today’s guest blogger is Edwin Blancovitch. Edwin is president of &lt;/strong&gt;&lt;a href="http://advdev.net/"&gt;&lt;strong&gt;Advanced Developers.net&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, creators of &lt;/strong&gt;&lt;a href="http://www.easypayroll.net/"&gt;&lt;strong&gt;Easy Payroll&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, a software package to manage your human resources, payroll, scheduling, time and attendance needs.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I have been using the ribbon for the last two years and I like it so much, however there was a situation where I wanted to hide the ribbon. I used the Minimize the Ribbon command to hide it, but there was still some space being used by the Office button and the ribbon tabs. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/4c8309168de3_D515/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/4c8309168de3_D515/image_thumb_1.png" width="364" height="182" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After some experimentation and some research I found that I could use the &lt;a href="http://msdn.microsoft.com/en-us/library/bb214112.aspx"&gt;ShowToolbar&lt;/a&gt; method to hide the ribbon. The following line of code makes the ribbon disappear completely, and allows you to see the application like in Office 2003, without the command bars. &lt;/p&gt;  &lt;pre class="csharpcode"&gt;DoCmd.ShowToolbar &lt;span class="str"&gt;&amp;quot;Ribbon&amp;quot;&lt;/span&gt;, acToolbarNo&lt;/pre&gt;
&lt;style type="text/css"&gt;






.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;That will make the ribbon disappear completely, and allow you to see the application like in Office 2003, without the command bars.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/4c8309168de3_D515/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/4c8309168de3_D515/image_thumb_2.png" width="364" height="160" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;To display the ribbon again, use this code:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;DoCmd.ShowToolbar &lt;span class="str"&gt;&amp;quot;Ribbon&amp;quot;&lt;/span&gt;, acToolbarYes&lt;/pre&gt;
&lt;style type="text/css"&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/access/archive/2009/05/21/how-to-create-a-shortcut-menu-for-a-form-form-control-or-report.aspx"&gt;I wrote an article&lt;/a&gt; a long time ago for creating context command bars with VBA code, now it will be great to experiment by creating new command bars that go in the top menu. You can use context command bars in your forms, and make it work the way you wanted.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9908394" width="1" height="1"&gt;</content><author><name>Mike Stowe</name><uri>http://blogs.msdn.com/members/Mike+Stowe.aspx</uri></author><category term="Ribbon" scheme="http://blogs.msdn.com/access/archive/tags/Ribbon/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>Nulls vs. zero-length strings: a Power Tip from the past</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/14/nulls-vs-zero-length-strings-a-power-tip-from-the-past.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/14/nulls-vs-zero-length-strings-a-power-tip-from-the-past.aspx</id><published>2009-10-14T18:48:12Z</published><updated>2009-10-14T18:48:12Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Today's guest blogger is Access MVP Garry Robinson, who offers the Smart Access collection of articles at &lt;/strong&gt;&lt;a href="http://www.vb123.com/kb"&gt;&lt;strong&gt;http://www.vb123.com/kb&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;A few months ago I purchased the rights to publish the Smart Access magazine online and it is from that collection that I offer this tip from Paul Litwin, the first editor of Smart Access. At the end of that I provide a link to an editorial on Null Values written by the second editor Peter Vogel. It never hurts to get a refresher course on Null values, a necessary evil for database developers.&lt;/p&gt;  &lt;h5&gt;Tip by Paul Litwin from 1997 &lt;/h5&gt;  &lt;p&gt;Even though Access considers Nulls and zero-length strings (ZLS) separate values, often developers wish to treat them as equivalent for the sake of an &lt;strong&gt;If...Then&lt;/strong&gt; statement or some other stretch of code. One way to accomplish this is to write code like this:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;' Not so efficient &lt;/span&gt;
&lt;span class="kwrd"&gt;If&lt;/span&gt; IsNull(varAge) &lt;span class="kwrd"&gt;or&lt;/span&gt; varAge = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;Then&lt;/span&gt;
     &lt;span class="rem"&gt;' do something &lt;/span&gt;
&lt;span class="kwrd"&gt;End&lt;/span&gt; If&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;A better way to do this is:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;' More efficient &lt;/span&gt;
&lt;span class="kwrd"&gt;If&lt;/span&gt; Len(varAge &amp;amp; &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;) = 0 &lt;span class="kwrd"&gt;Then&lt;/span&gt;
     &lt;span class="rem"&gt;' do something &lt;/span&gt;
&lt;span class="kwrd"&gt;End&lt;/span&gt; If&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;This second version of the code is more efficient for two reasons. First, if &lt;strong&gt;varAge&lt;/strong&gt; is Null, the code converts it into a ZLS by appending a ZLS to it. This lets us replace two tests with one. Second, it’s simply more efficient to check for a ZLS using Len(ZLS) = 0 rather than ZLS=&amp;quot;&amp;quot;.&lt;/p&gt;

&lt;p&gt;You can use a variation of this technique if you ever need to place the value of a text box or a variant variable into a string. Strings can’t contain Null values, so you may be tempted to write code like this that first checks to see if the text box is Null:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;' Another correct but slow method &lt;/span&gt;
&lt;span class="kwrd"&gt;If&lt;/span&gt; IsNull(txtAge) &lt;span class="kwrd"&gt;Then&lt;/span&gt;
     strAge = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; 
&lt;span class="kwrd"&gt;Else&lt;/span&gt;     
     strAge = txtAge 
&lt;span class="kwrd"&gt;End&lt;/span&gt; If&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;A much faster way to do this is to use code like this instead:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;' This is faster &lt;/span&gt;
strAge = txtAge &amp;amp; &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;This code avoids doing the test altogether by setting the value to the concatenation of the text box and a ZLS. If the text box is Null, this converts it into a ZLS. If the text box is either a ZLS or a regular value, then the concatenation has no effect. &lt;/p&gt;

&lt;p&gt;Read more on Nulls in Peter Vogels editorial here &lt;a href="http://www.vb123.com/kb/200207_pv_ed.htm"&gt;http://www.vb123.com/kb/200207_pv_ed.htm&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9907281" width="1" height="1"&gt;</content><author><name>cdowns</name><uri>http://blogs.msdn.com/members/cdowns.aspx</uri></author><category term="Code" scheme="http://blogs.msdn.com/access/archive/tags/Code/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry><entry><title>New Access fan page on Facebook</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/12/new-access-fan-page-on-facebook.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/12/new-access-fan-page-on-facebook.aspx</id><published>2009-10-12T16:38:15Z</published><updated>2009-10-12T16:38:15Z</updated><content type="html">&lt;p&gt;In our never-ending quest to spread the word about Microsoft Access, we now have an official fan page on Facebook! Our news feed includes links to articles on MSDN, TechNet, and Office Online, as well as posts on this blog. You can choose to see our posts in your Facebook news feed automatically, or read them only when you want to. Similarly, if you post something on the fan page, you can choose to be notified whenever someone responds to you.&lt;/p&gt;  &lt;p&gt;Here’s a quick walkthrough of how the Microsoft Access fan page on Facebook works:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Join the Access fan page&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you already have a Facebook account, sign in, and then follow these simple steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Visit &lt;a title="http://www.facebook.com/pages/Microsoft-Access/102823256361" href="http://www.facebook.com/pages/Microsoft-Access/102823256361"&gt;http://www.facebook.com/pages/Microsoft-Access/102823256361&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;Near the top of the page, click the &lt;strong&gt;Become a Fan&lt;/strong&gt; button.       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/NewAccessfanpageonFacebook_BD40/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/NewAccessfanpageonFacebook_BD40/image_thumb.png" width="480" height="219" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;strong&gt;Browse through Access wall posts&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Once you’ve joined the Microsoft Access fan page on Facebook, you can begin browsing for posts right away.&lt;/p&gt;  &lt;p&gt;To switch the default view to the page wall, click the &lt;strong&gt;Wall&lt;/strong&gt; tab on the top navigation bar near the Access logo:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/NewAccessfanpageonFacebook_BD40/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/NewAccessfanpageonFacebook_BD40/image_thumb_1.png" width="327" height="215" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You can now see all of the wall posts by the administrator and by other Access users just like you. Wall posts are shown in chronological order and the newest posts appear near the top of the page.&lt;/p&gt;  &lt;p&gt;Join the conversation! Reply to an existing wall post that interests you, or make your own post to start a new discussion or to share something with the other members.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hide automatic Access fan page updates&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Depending on when you join the Access fan page, you’ll probably see automatic updates in your Facebook news feed within a few days. If you like seeing these updates, you don’t need to do anything else. Check out the ones that sound interesting and ignore the ones that you don’t care about on any particular day.&lt;/p&gt;  &lt;p&gt;If you don’t want automatic Access fan page updates to appear in your news feed, you can easily disable them by following these steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;While signed in to your Facebook account, go to the Facebook home page at &lt;a href="http://www.facebook.com/"&gt;http://www.facebook.com/&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;Scroll through your Facebook news feed (the center column of your home page) and find any one of the Access fan page updates that have appeared. &lt;/li&gt;    &lt;li&gt;Move the mouse pointer over the Access post until you see a &lt;strong&gt;Hide&lt;/strong&gt; link show up near the right side of the post. &lt;/li&gt;    &lt;li&gt;When you move the mouse pointer over the &lt;strong&gt;Hide&lt;/strong&gt; link, it becomes a button. Click it. &lt;/li&gt;    &lt;li&gt;On the mini-menu that appears below the &lt;strong&gt;Hide&lt;/strong&gt; button, click &lt;strong&gt;Hide Microsoft Access&lt;/strong&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Facebook will briefly display a yellow confirmation box, informing you that Access updates will now be hidden from view.&lt;/p&gt;  &lt;p&gt;&lt;img title="Tip" alt="Tip" align="absBottom" src="http://i199.photobucket.com/albums/aa152/nota_bene_/icon_tip.jpg" width="25" height="14" /&gt;&amp;#160; While Access fan page updates are hidden from view in your Facebook news feed, you can still visit the Microsoft Access fan page at any time by entering &lt;strong&gt;Microsoft Access &lt;/strong&gt;into the Search box near the top of any Facebook page and then clicking the search result. It’s a fast way to return to the fan page whenever you want to check for updates on your own.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Restore hidden Access fan page updates&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you previously disabled Access fan page updates from your Facebook news feed and you’ve changed your mind about seeing automatic updates, you can easily restore them by following these steps:&lt;/p&gt;  &lt;ol&gt;   &lt;ol&gt;     &lt;li&gt;While signed in to your Facebook account, go to the Facebook home page at &lt;a href="http://www.facebook.com/"&gt;http://www.facebook.com/&lt;/a&gt;. &lt;/li&gt;      &lt;li&gt;Scroll to the very end of your Facebook news feed (the center column of your home page) until you see the navigation bar in the page footer:        &lt;br /&gt;&lt;img title="The bottom navigation bar in the Facebook stream" border="0" alt="The bottom navigation bar in the Facebook stream" src="http://i199.photobucket.com/albums/aa152/nota_bene_/on_stream_options.jpg" width="462" height="63" /&gt; &lt;/li&gt;      &lt;li&gt;Click the &lt;strong&gt;Edit Options&lt;/strong&gt; link. &lt;/li&gt;      &lt;li&gt;Near the top of the &lt;strong&gt;Hidden from News Feed&lt;/strong&gt; popup dialog box, click the &lt;strong&gt;Pages&lt;/strong&gt; link. &lt;/li&gt;      &lt;li&gt;Scroll down until you see &lt;strong&gt;Microsoft Access&lt;/strong&gt;, and then click the &lt;strong&gt;Add to News Feed&lt;/strong&gt; button. &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p&gt;When you have completed these steps, you will once again see automatic Microsoft Access fan page notifications in your Facebook news feed.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Share what you know!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Post to the wall! It’s just a conversation with like-minded people who enjoy and rely on Access in similar ways as you.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9906197" width="1" height="1"&gt;</content><author><name>cdowns</name><uri>http://blogs.msdn.com/members/cdowns.aspx</uri></author></entry><entry><title>Identifying the Record Selected on a Continuous Form</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/access/archive/2009/10/07/identifying-the-record-selected-on-a-continuous-form.aspx" /><id>http://blogs.msdn.com/access/archive/2009/10/07/identifying-the-record-selected-on-a-continuous-form.aspx</id><published>2009-10-07T02:03:30Z</published><updated>2009-10-07T02:03:30Z</updated><content type="html">&lt;p&gt;&lt;strong&gt;Today’s guest blogger is Edwin Blancovitch. Edwin is president of &lt;/strong&gt;&lt;a href="http://advdev.net/"&gt;&lt;strong&gt;Advanced Developers.net&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, creators of &lt;/strong&gt;&lt;a href="http://www.easypayroll.net/"&gt;&lt;strong&gt;Easy Payroll&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, a software package to manage your human resources, payroll, scheduling, time and attendance needs.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Regularly when we create databases for our customers we use continuous forms for data entry. The problem is, it’s often difficult for users to identify the record they’re working on a big continuous form with tons of records.&lt;/p&gt;  &lt;p&gt;I’ve found a way to overcome this in just a few just quick steps that I’d like to share with you guys.&lt;/p&gt;  &lt;p&gt;This is fully compatible with previous versions of Access, because I have been doing this my whole life. Actually, I just found it by mistake, while trying to create a conditional formatting event. We can do this with conditional formatting but this method is easier.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;First select the continuous form. &lt;/li&gt;    &lt;li&gt;Set the &lt;strong&gt;Back Color&lt;/strong&gt; of all the controls in the detail section of the form to the color that you want to be displayed when the user clicks the control. In this example, I’m using &lt;strong&gt;#ADC0D9&lt;/strong&gt;. &lt;/li&gt;    &lt;li&gt;Set the &lt;strong&gt;Back Style&lt;/strong&gt; property of all the controls in the detail section of the form to &lt;strong&gt;Transparent&lt;/strong&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now, when you display the object in form view you will see the selected control highlighted with the color you have selected in the Back Color property of the control.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/Identifythecolorofarecord_C932/BackColor_02.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="BackColor_02" border="0" alt="BackColor_02" src="http://blogs.msdn.com/blogfiles/access/WindowsLiveWriter/Identifythecolorofarecord_C932/BackColor_02_thumb.png" width="589" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;YEAH, now all your users can easily identify the current selected record and even the selected control where the cursor is. That’s all, no code, no difficult conditional format to configure.&lt;/p&gt;  &lt;p&gt;You can download a sample database that illustrates this method &lt;a href="http://cid-f83d4d33f0a1a23a.skydrive.live.com/self.aspx/Sample%20Databases/BackGround.accdb"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;h6&gt;Send your Power Tips to Mike and Chris at &lt;a href="mailto:accpower@microsoft.com"&gt;accpower@microsoft.com&lt;/a&gt;.&lt;/h6&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9904028" width="1" height="1"&gt;</content><author><name>Mike Stowe</name><uri>http://blogs.msdn.com/members/Mike+Stowe.aspx</uri></author><category term="Form" scheme="http://blogs.msdn.com/access/archive/tags/Form/default.aspx" /><category term="Power Tips" scheme="http://blogs.msdn.com/access/archive/tags/Power+Tips/default.aspx" /></entry></feed>