<?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>ResearchTutorials.com &#187; combo box</title>
	<atom:link href="http://www.researchtutorials.com/tag/combo-box/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.researchtutorials.com</link>
	<description>Helping you work faster and smarter. Video tutorials for the academic and research community.</description>
	<lastBuildDate>Fri, 23 Oct 2009 17:17:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Make Access combo boxes drop down automatically</title>
		<link>http://www.researchtutorials.com/data-management/make-access-combo-boxes-drop-down-automatically/</link>
		<comments>http://www.researchtutorials.com/data-management/make-access-combo-boxes-drop-down-automatically/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 14:53:14 +0000</pubDate>
		<dc:creator>Kurt</dc:creator>
				<category><![CDATA[Data Management]]></category>
		<category><![CDATA[access 2003]]></category>
		<category><![CDATA[combo box]]></category>

		<guid isPermaLink="false">http://www.researchtutorials.com/wptestsite/?p=130</guid>
		<description><![CDATA[By default, in order to see the items in a combo box, you need to click on the little arrow in the drop down box. This can get tedious, especially if there are a lot of combo boxes on your form. It's also not efficient for high speed data entry, like using TAB to move through controls and the number pad or arrow keys to select answers. With just a few lines of code, you can make your combo boxes drop down automatically when the cursor enters them. I'll show you two ways to accomplish this.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.researchtutorials.com/wp-content/uploads/2009/07/dropdown2.jpg"  rel="shadowbox[post-130];player=img;"><img class="size-full wp-image-289 alignright" title="dropdown" src="http://www.researchtutorials.com/wp-content/uploads/2009/07/dropdown2.jpg" alt="dropdown" width="292" height="126" /></a>By default, in order to see the items in a combo box, you need to click on the little arrow in the drop down box. This can get tedious, especially if there are a lot of combo boxes on your form. It&#8217;s also not efficient for high speed data entry, like using TAB to move through controls and the number pad or arrow keys to select answers. With just a few lines of code, you can make your combo boxes drop down automatically when the cursor enters them. I&#8217;ll show you two ways to accomplish this.</p>
<p>After the video I list the steps for both methods. You can just read those but if you get lost, the video should clarify everything.</p>
<p><a href="http://www.researchtutorials.com/data-management/make-access-combo-boxes-drop-down-automatically/" ><em>Click here to view the embedded video.</em></a></p>
<h3>Method 1: Apply the drop down setting to combo boxes, one by one</h3>
<p>This method is useful if you&#8217;re dealing only with a few combo boxes.</p>
<ol>
<li>Open the form in Design View</li>
<li>Double click on the combo box to open its properties box</li>
<li>Click the <strong>Enter</strong> tab</li>
<li>In the <strong>On Enter</strong> line, click the dropdown arrow and select <strong>[EventProcedure]</strong></li>
<li> Click the marching ants (&#8230;). This open the Visual Basic window.</li>
<li> In between the two lines of code already provided (Private Sub &#8230; End Sub), type the following:</li>
</ol>
<blockquote>
<pre>Me.q1.Dropdown</pre>
</blockquote>
<p>So the final code should look like this:</p>
<blockquote>
<pre>Private Sub q1_Enter()
   Me.q1.Dropdown
End Sub</pre>
</blockquote>
<p>(This example assumes q1 is the name of your combo box.)</p>
<ol>
<li>Close the Visual Basic window (big red X, top right corner)</li>
<li>Close the still open properties box</li>
<li> Open your form in Form View and test it out.</li>
</ol>
<h3>Method 2: Apply the setting to multiple combo boxes, all at once</h3>
<p>This method is useful if you want to apply the setting to many combo boxes at once. Also, because the code is in what&#8217;s called a &#8220;global module,&#8221; you can use it with combo boxes on many different forms. (&#8220;Global&#8221; means the code can be referred to from any form in your database.) This is more efficient and results in less code filling up your database.</p>
<ol>
<li>In the Access database window, click on <strong>Modules</strong>. (If the database window isn&#8217;t showing, it&#8217;s probably hiding behind an open form. Close or minimize your form, or hit <strong>F11</strong> to pull it up.)</li>
<li> Click <strong>New</strong>. This opens the Visual Basic window.</li>
<li> Type the following:</li>
</ol>
<blockquote>
<pre>Function DropdownCombo()
On Error Resume Next
   Screen.ActiveControl.Dropdown
End Function</pre>
</blockquote>
<ol>
<li>Click <strong>Save</strong>, give the module a name (e.g., modDropdown), and click <strong>OK</strong></li>
<li>Close the Visual Basic window (big red <strong>X</strong>, top right corner)</li>
<li> In the Access database window, click on <strong>Forms</strong></li>
<li> Select your form</li>
<li> Click <strong>Design</strong></li>
<li> Click the combo box or combo boxes to which you&#8217;d like to apply the drop down feature. (To select multiple combo boxes, hold down <strong>SHIFT </strong>while clicking them. This allows you to create a &#8220;Multiple Selection.&#8221;)</li>
<li> Once you&#8217;ve selected them, hover your mouse over any one of them until you see the flat hand</li>
<li> Right click, choose <strong>Properties</strong></li>
<li> Click on the <strong>Event</strong> tab</li>
<li> On the <strong>On Enter line</strong>, type this: =DropdownCombo()</li>
<li> Close the Properties box</li>
<li> Open the form in Form View to test it out.</li>
</ol>
<p><h3>Downloads</h3>
<table style="border: 1px solid #CCC;" cellpadding="3" width="100%">
  <tr>
    <td width="35">
      <img src="http://www.researchtutorials.com/wp-content/plugins/downloads-manager/img/icons/default.gif" alt="http://www.researchtutorials.com/wp-content/plugins/downloads-manager/img/icons/default.gif">
    </td>
    <td>
      <b>Download:</b> <a href="http://www.researchtutorials.com/?file_id=6" >Dropdown Combo Box Example (Access 2003)</a> <small>(792KB)</small><br />
      <b>Added:</b> 28/07/2009 <br />
      <b>Tutorial:</b> Make Access combo boxes drop down automatically
http://www.researchtutorials.com/data-management/make-access-combo-boxes-drop-down-automatically/ <br />
    </td>
  </tr>
</table></p>
]]></content:encoded>
			<wfw:commentRss>http://www.researchtutorials.com/data-management/make-access-combo-boxes-drop-down-automatically/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
