<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-12101256</id><updated>2011-11-27T16:47:31.753-08:00</updated><title type='text'>MS Access Insider</title><subtitle type='html'>This blog spot contains Tutorials and compilations of Jantikey in creating and programming MS Access Database.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12101256.post-114589608063335664</id><published>2006-04-24T09:27:00.000-07:00</published><updated>2006-04-24T09:28:01.010-07:00</updated><title type='text'>testing</title><content type='html'>test&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-114589608063335664?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/114589608063335664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=114589608063335664' title='43 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/114589608063335664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/114589608063335664'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2006/04/testing.html' title='testing'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113874059466479783</id><published>2006-01-31T12:48:00.000-08:00</published><updated>2006-01-31T12:50:12.663-08:00</updated><title type='text'>How to create running totals in a query</title><content type='html'>&lt;h1 class="title"&gt;How to create a running totals query in Microsoft Access&lt;/h1&gt; &lt;div class="appliesToLink"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#appliesto"&gt;View products that this article applies to.&lt;/a&gt;&lt;/div&gt; &lt;div class="articleProperty"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="label"&gt;Article ID&lt;/td&gt;&lt;td class="text"&gt;:&lt;/td&gt;&lt;td class="text"&gt;290136&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="label"&gt;Last Review&lt;/td&gt;&lt;td class="text"&gt;:&lt;/td&gt;&lt;td class="text"&gt;June 9, 2004&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="label"&gt;Revision&lt;/td&gt;&lt;td class="text"&gt;:&lt;/td&gt;&lt;td class="text"&gt;1.0&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;div class="notice"&gt;This article was previously published under Q290136&lt;/div&gt; &lt;div class="notice"&gt;Advanced: Requires expert coding, interoperability, and multiuser skills.&lt;br /&gt;&lt;br /&gt;This article applies only to a Microsoft Access database (.mdb).&lt;br /&gt;&lt;br /&gt;For a Microsoft Access 2000 version of this article, see &lt;a class="KBlink" href="http://support.microsoft.com/kb/208714/EN-US/"&gt;208714&lt;/a&gt;&lt;span class="pLink"&gt; (http://support.microsoft.com/kb/208714/EN-US/)&lt;/span&gt;.&lt;br /&gt;&lt;div class="notice"&gt;  For a Microsoft Access 97 version of this article, see &lt;a class="KBlink" href="http://support.microsoft.com/kb/138911/"&gt;138911&lt;/a&gt;&lt;span class="pLink"&gt; (http://support.microsoft.com/kb/138911/)&lt;/span&gt;.  &lt;/div&gt;&lt;/div&gt; &lt;div class="toc"&gt;&lt;h5&gt;On This Page&lt;/h5&gt;&lt;table class="tallTable"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;col&gt;&lt;col&gt;&lt;col&gt;&lt;col&gt;&lt;col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#kb1"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/downarrow.gif" alt="SUMMARY" title="SUMMARY" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text" colspan="5"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#kb1"&gt;SUMMARY&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#kb2"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/downarrow.gif" alt="MORE INFORMATION" title="MORE INFORMATION" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text" colspan="5"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#kb2"&gt;MORE INFORMATION&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="space"&gt; &lt;/td&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#XSLTH3120121123120121120120"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/downarrow.gif" alt="Method 1" title="Method 1" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text" colspan="4"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#XSLTH3120121123120121120120"&gt;Method 1&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="space"&gt; &lt;/td&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#XSLTH3134121123120121120120"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/downarrow.gif" alt="Method 2" title="Method 2" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text" colspan="4"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#XSLTH3134121123120121120120"&gt;Method 2&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#kb3"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/downarrow.gif" alt="REFERENCES" title="REFERENCES" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text" colspan="5"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#kb3"&gt;REFERENCES&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#appliesto"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/downarrow.gif" alt="APPLIES TO" title="APPLIES TO" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text" colspan="5"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#appliesto"&gt;APPLIES TO&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;div class="section"&gt;&lt;h2 class="subTitle"&gt;SUMMARY&lt;/h2&gt;&lt;div class="sbody"&gt; This article demonstrates two methods that you can use to create a running totals query. A running totals query is a query in which the total for each record is a summation of that record and any previous records. This type of query is useful for displaying cumulative totals over a group of records (or over a period of time) in a graph or report.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt; You can see a demonstration of the technique that is used in this article in the sample file Qrysmp00.exe. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base: &lt;div class="indent"&gt;&lt;a class="KBlink" href="http://support.microsoft.com/kb/207626/EN-US/"&gt;207626&lt;/a&gt;&lt;span class="pLink"&gt; (http://support.microsoft.com/kb/207626/EN-US/)&lt;/span&gt; ACC2000: Access 2000 Sample Queries Available in Download Center &lt;/div&gt;&lt;div class="topOfPage"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif" alt="Back to the top" title="Back to the top" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;Back to the top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 class="subTitle"&gt;MORE INFORMATION&lt;/h2&gt;&lt;div class="sbody"&gt;&lt;h3&gt;Method 1&lt;/h3&gt;  The first method uses a &lt;b&gt;DSum&lt;/b&gt;() function and criteria in a query to create a running sum over time. The &lt;b&gt;DSum&lt;/b&gt;() function sums the current record and any previous records. When the query moves to the next record, the &lt;b&gt;DSum&lt;/b&gt;() function runs again and updates the cumulative total.&lt;br /&gt;&lt;br /&gt; The following sample query uses the Orders table from the sample database Northwind.mdb to create a running sum of the freight costs for each month in 1997. The sample data is limited to one year for performance reasons. Because the &lt;b&gt;DSum&lt;/b&gt;() function runs once for every record in the query, it may take several seconds (depending on the speed of your computer) for the query to finish processing. To create and run this query, follow these steps: &lt;table class="list ol"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="number"&gt;1.&lt;/td&gt;&lt;td class="text"&gt;Open the sample database Northwind.mdb.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;2.&lt;/td&gt;&lt;td class="text"&gt;Create a new select query and add the Orders table.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;3.&lt;/td&gt;&lt;td class="text"&gt;On the &lt;b&gt;View&lt;/b&gt; menu, click &lt;b&gt;Totals&lt;/b&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;4.&lt;/td&gt;&lt;td class="text"&gt;In the first column of the query design grid, type the following expression in the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt;, &lt;b&gt;Sort&lt;/b&gt;, and &lt;b&gt;Show&lt;/b&gt; boxes: &lt;pre class="in_text"&gt;   Field: AYear: DatePart("yyyy",[OrderDate])&lt;br /&gt;  Total: Group By&lt;br /&gt;  Sort: Ascending&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;  The expression in the &lt;b&gt;Field&lt;/b&gt; box displays and sorts the year portion of the OrderDate field.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;5.&lt;/td&gt;&lt;td class="text"&gt;In the second column of the query design grid, type the following expression in the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt;, &lt;b&gt;Sort&lt;/b&gt;, and &lt;b&gt;Show&lt;/b&gt; boxes:  &lt;pre class="in_text"&gt;   Field: AMonth: DatePart("m",[OrderDate])&lt;br /&gt;  Total: Group By&lt;br /&gt;  Sort: Ascending&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;  The expression in the &lt;b&gt;Field&lt;/b&gt; box sorts and displays the month portion of the Order Date field as an integer value from 1 to 12.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;6.&lt;/td&gt;&lt;td class="text"&gt;In the third column of the query design grid, type the following expression in the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt; and &lt;b&gt;Show&lt;/b&gt; boxes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; NOTE&lt;/b&gt;: In the following example, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this example. &lt;pre class="in_text"&gt;   Field: RunTot: DSum("Freight","Orders","DatePart('m', _&lt;br /&gt;         [OrderDate])&lt;=" &amp; [AMonth] &amp;amp; " And  DatePart('yyyy', _&lt;br /&gt;         [OrderDate])&lt;=" &amp; [AYear] &amp;amp; "")&lt;br /&gt;  Total: Expression&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;  The expression in the &lt;b&gt;Field&lt;/b&gt; box uses the &lt;b&gt;DSum&lt;/b&gt;() function to sum the Freight field when the values in both the AMonth and the AYear fields are less than or equal to the current record that the query is processing.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;7.&lt;/td&gt;&lt;td class="text"&gt;In the fourth column of the query design grid, type the following expression in the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt;, &lt;b&gt;Sort&lt;/b&gt;, and &lt;b&gt;Show&lt;/b&gt; boxes:  &lt;pre class="in_text"&gt;   Field: FDate: Format([OrderDate],"mmm")&lt;br /&gt;  Total: Group By&lt;br /&gt;  Sort: Ascending&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;  The expression in the &lt;b&gt;Field&lt;/b&gt; box displays each month in a textual format, such a Jan, Feb, Mar, and so on.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;8.&lt;/td&gt;&lt;td class="text"&gt;In the fifth column of the query design grid, type the following expression in the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt;, &lt;b&gt;Criteria&lt;/b&gt;, and &lt;b&gt;Show&lt;/b&gt; boxes:  &lt;pre class="in_text"&gt;   Field: DatePart("yyyy",[OrderDate])&lt;br /&gt;  Total: Where&lt;br /&gt;  Criteria: 1997&lt;br /&gt;  Show: No&lt;br /&gt;      &lt;/pre&gt;  The expression in the &lt;b&gt;Field&lt;/b&gt; box filters the query's recordset to include data from 1997 only. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;9.&lt;/td&gt;&lt;td class="text"&gt;Run the query.  Note that the RunTot field displays the following records with a running sum:  &lt;pre class="in_text"&gt;   AYear    AMonth     RunTot       FDate&lt;br /&gt;  --------------------------------------&lt;br /&gt;  1997     1          2238.98      Jan&lt;br /&gt;  1997     2          3840.43      Feb&lt;br /&gt;  1997     3          5729.24      Mar&lt;br /&gt;  1997     4          8668.34      Apr&lt;br /&gt;  1997     5          12129.74     May&lt;br /&gt;  1997     6          13982.39     Jun&lt;br /&gt;  1997     7          17729.29     Jul&lt;br /&gt;  1997     8          22204.73     Aug&lt;br /&gt;  1997     9          26565.26     Sep&lt;br /&gt;  1997     10         32031.38     Oct&lt;br /&gt;  1997     11         36192.09     Nov&lt;br /&gt;  1997     12         42748.64     Dec&lt;br /&gt;     &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="topOfPage"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif" alt="Back to the top" title="Back to the top" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;Back to the top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;h3&gt;Method 2&lt;/h3&gt;  The second method uses a totals query with a &lt;b&gt;DSum&lt;/b&gt;() function to create a running total over a group.&lt;br /&gt;&lt;br /&gt; The following sample query uses the Orders table to sum freight costs per employee as well as to calculate a running sum of the freight. To create and run the query, follow these steps:  &lt;table class="list ol"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="number"&gt;1.&lt;/td&gt;&lt;td class="text"&gt;Open the sample database Northwind.mdb.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;2.&lt;/td&gt;&lt;td class="text"&gt;Create a new select query and add the Orders table.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;3.&lt;/td&gt;&lt;td class="text"&gt;On the &lt;b&gt;View &lt;/b&gt;menu, click &lt;b&gt;Totals&lt;/b&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;4.&lt;/td&gt;&lt;td class="text"&gt;In the first column of the query design grid, add the following field to the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt; and &lt;b&gt;Show&lt;/b&gt; boxes:  &lt;pre class="in_text"&gt;   Field: EmpAlias: EmployeeID&lt;br /&gt;  Total: Group By&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;  This field groups data by EmployeeID.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;5.&lt;/td&gt;&lt;td class="text"&gt;In the second column of the query design grid, add the following field to the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt; and &lt;b&gt;Show&lt;/b&gt; boxes:  &lt;pre class="in_text"&gt;   Field: Freight&lt;br /&gt;  Total: Sum&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;     This field sums the freight data. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;6.&lt;/td&gt;&lt;td class="text"&gt;In the third column of the query design grid, type the following expression in the &lt;b&gt;Field&lt;/b&gt; box, and make the following selections for the &lt;b&gt;Total&lt;/b&gt; and &lt;b&gt;Show&lt;/b&gt; boxes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: In the following example, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this example. &lt;pre class="in_text"&gt;   Field: RunTot: Format(DSum("Freight","Orders","[EmployeeID]&lt;=" _&lt;br /&gt;         &amp; [EmpAlias] &amp;amp; ""),"$0,000.00")&lt;br /&gt;  Total: Expression&lt;br /&gt;  Show: Yes&lt;br /&gt;      &lt;/pre&gt;  The expression in the &lt;b&gt;Field&lt;/b&gt; box uses a &lt;b&gt;DSum&lt;/b&gt;() function to sum the Freight field when the EmployeeID is less than or equal to the current EmpAlias, and then formats the field in dollars.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;7.&lt;/td&gt;&lt;td class="text"&gt;Run the query. Note that the RunTot field displays the following records with a running sum:  &lt;pre class="in_text"&gt;   Employee              SumOfFreight     RunTot&lt;br /&gt;  -------------------------------------------------&lt;br /&gt;  Davolio, Nancy        $8,836.64        $8,836.64&lt;br /&gt;  Fuller, Andrew        $8,696.41        $17,533.05&lt;br /&gt;  Leverling,Janet       $10,884.74       $28,417.79&lt;br /&gt;  Peacock, Margaret     $11,346.14       $39,763.93&lt;br /&gt;  Buchanan, Steven      $3,918.71        $43,682.64&lt;br /&gt;  Suyama, Michael       $3,780.47        $47,463.11&lt;br /&gt;  King, Robert          $6,665.44        $54,128.55&lt;br /&gt;  Callahan, Laura       $7,487.88        $61,616.43&lt;br /&gt;  Dodsworth, Anne       $3,326.26        $64,942.69&lt;br /&gt;     &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="topOfPage"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif" alt="Back to the top" title="Back to the top" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;Back to the top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;h2 class="subTitle"&gt;REFERENCES&lt;/h2&gt;&lt;div class="sbody"&gt; For more information about totals queries, click &lt;strong class="uiterm"&gt;Microsoft Access Help&lt;/strong&gt; on the &lt;strong class="uiterm"&gt;Help&lt;/strong&gt; menu, type &lt;span class="userInput"&gt;calculations&lt;/span&gt; in the Office Assistant or the Answer Wizard, and then click &lt;strong class="uiterm"&gt;Search&lt;/strong&gt; to view the topics returned. &lt;div class="topOfPage"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif" alt="Back to the top" title="Back to the top" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;Back to the top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="appliesTo"&gt;&lt;hr /&gt;&lt;h5&gt;APPLIES TO&lt;/h5&gt;&lt;table class="list"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;Microsoft Office Access 2003&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;Microsoft Access 2002 Standard Edition&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;div class="topOfPage"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif" alt="Back to the top" title="Back to the top" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;Back to the top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt; &lt;table&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td class="header"&gt;&lt;h5&gt;Keywords: &lt;/h5&gt;&lt;/td&gt;&lt;td class="text"&gt;kbhowto KB290136&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt; &lt;table&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td class="image"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;&lt;img src="http://support.microsoft.com/library/images/support/kbgraphics/public/en-us/uparrow.gif" alt="Back to the top" title="Back to the top" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;a href="http://support.microsoft.com/?kbid=290136#top"&gt;Back to the top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt; Source: &lt;a href="http://support.microsoft.com/?kbid=290136"&gt;http://support.microsoft.com/?kbid=290136&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113874059466479783?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113874059466479783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113874059466479783' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113874059466479783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113874059466479783'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2006/01/how-to-create-running-totals-in-query.html' title='How to create running totals in a query'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113328303800598098</id><published>2005-11-29T08:47:00.000-08:00</published><updated>2005-11-29T08:50:38.410-08:00</updated><title type='text'>Converting a Microsoft Access Database to an MDE File</title><content type='html'>The situation may arise when you quickly need to secure and distribute a Microsoft Access database that also contains Microsoft Access VBA code. You will protect the database from editing by restricting the database users access to the design views, however you will need to allow the users to process their data as normal.                 &lt;p&gt;It may be that you haven't got the time to fully create &lt;a href="http://www.databasedev.co.uk/user_accounts.html" class="pagelink"&gt;Microsoft                  Access User Accounts&lt;/a&gt; or to set &lt;a href="http://www.databasedev.co.uk/permissions.html" class="pagelink"&gt;Microsoft                  Access Security Permissions&lt;/a&gt;. By knowing what can and cannot be done by using the Microsoft Access MDE file format, will allow you to make a decision and to quickly release a secure database to the users.&lt;/p&gt;                 &lt;p&gt;&lt;strong&gt;Microsoft Access MDE File Format&lt;/strong&gt;&lt;/p&gt;                 &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.databasedev.co.uk/image/create-mde.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://www.databasedev.co.uk/image/create-mde.gif" alt="" border="0" /&gt;&lt;/a&gt;The MDE file format is a special extension of the standard Microsoft Access MDB format, and is used to distribute an application. An MDE file compiles all of the modules, removes all editable source code and compacts the database. The resulting MDE file allows the database users to perform normal database operations, however it prohibits any changes from being made to the objects that support, or the code that runs the application.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="figuretext"&gt;Figure1: Creating an MDE File&lt;/span&gt;               &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Benefits of an MDE File&lt;/strong&gt;&lt;/p&gt;                 &lt;p&gt;There are various benefits to be had by creating and distributing                  the database as an MDE file:&lt;/p&gt;                 &lt;ul type="square"&gt; &lt;li class="spacing"&gt;Reducing the size of the database - the size                    of the database will be reduced due to the removal of the code,                    so memory usage is optimized, which will improve performance.&lt;/li&gt;&lt;li class="spacing"&gt;Allowing VBA code to run, but protection from                    the code being viewed or edited.&lt;/li&gt;&lt;li class="spacing"&gt;Security of objects without requiring additional                    &lt;a href="http://www.databasedev.co.uk/access_security.html" class="pagelink"&gt;Microsoft Access                    user-level security&lt;/a&gt; to be set.&lt;/li&gt;&lt;li class="spacing"&gt;Allowing database users to update data and                    run reporting options without having to provide the full database.&lt;/li&gt; &lt;/ul&gt;                 &lt;p&gt;&lt;strong&gt;Forms and Reports in an MDE File&lt;/strong&gt;&lt;/p&gt;                 &lt;p&gt;By converting your Microsoft Access database into an MDE file                  you will prevent your database users from tampering with your                  VBA code. When a user accesses an MDE file, they cannot:&lt;/p&gt;                 &lt;ul type="square"&gt; &lt;li class="spacing"&gt;View, modify or create Microsoft Access forms                    in design view.&lt;/li&gt;&lt;li class="spacing"&gt;View, modify or create Microsoft Access reports                    in design view.&lt;/li&gt;&lt;li class="spacing"&gt;View, modify or create Microsoft Access modules                    in design view.&lt;/li&gt;&lt;li class="spacing"&gt;Add, delete or change references to databases                    or to object libraries.&lt;/li&gt;&lt;li class="spacing"&gt;Change any VBA code - there is no source code                    available.&lt;/li&gt;&lt;li class="spacing"&gt;Import or export any forms, reports or code                    modules.&lt;/li&gt; &lt;/ul&gt;                 &lt;p&gt;MDE File Requirements&lt;/p&gt;                 &lt;p&gt;There are some requirements to saving your Microsoft Access &lt;strong&gt;MDB&lt;/strong&gt;                  file as a Microsoft Access &lt;strong&gt;MDE&lt;/strong&gt; file, and the                  following conditions apply:&lt;/p&gt;                 &lt;ul type="square"&gt; &lt;li&gt; &lt;span class="spacing"&gt;You must have password access to the                    Visual Basic code in the database.&lt;/span&gt;&lt;/li&gt;&lt;li class="spacing"&gt;You must save all references to other Microsoft                    Access databases.&lt;/li&gt;&lt;li class="spacing"&gt;You must have removed replication from a replicated                    database.&lt;/li&gt;&lt;li class="spacing"&gt;If you want to remove user-level security                    options, you must do so prior to converting the file to the                    MDE format.&lt;/li&gt;&lt;li&gt;&lt;span class="spacing"&gt;If your database does have user-level                    security and you do need to preserve this, you must do: &lt;/span&gt;                    &lt;ul type="square"&gt;&lt;li class="spacing"&gt;Be a member of the workgroup that defines                        the user accounts used to access the database, or that was                        in use when the database was created.&lt;/li&gt;&lt;li class="spacing"&gt;Have Open/Run and Open Exclusive permissions                        for the database.&lt;/li&gt;&lt;li class="spacing"&gt;Have Modify Design or Administer permissions                        for any tables in the database, or be the owner of any of                        the tables in the database.&lt;/li&gt;&lt;li class="spacing"&gt;Have Read Design permissions for all objects                        in the database.&lt;/li&gt;&lt;/ul&gt;                 &lt;/li&gt; &lt;/ul&gt;                 &lt;p&gt;&lt;strong&gt;How to Convert a Microsoft Access Database to an MDE                  File&lt;/strong&gt;&lt;/p&gt;                 &lt;p&gt;Once you have determined that you meet the above criteria for                  converting an Access database in MDB format to the MDE format,                  it is a simple process to make the conversion happen. You will                  need to perform the following actions:&lt;/p&gt;                 &lt;ol&gt; &lt;li&gt;&lt;span class="spacing"&gt;If necessary, convert the database into                    the latest Microsoft Access version - if the file format is                    Access 2000 and you are working in Microsoft Access 2003 you                    will need to convert the database file format to Access 2003:                    &lt;/span&gt;                    &lt;ol type="i"&gt;&lt;li class="spacing"&gt;From the Tools menu, choose Database Utilities                        &gt;&gt; Convert Database &gt;&gt; To Access 2003 File Format.&lt;/li&gt;&lt;li class="spacing"&gt;Navigate to the database that needs to                        be converted and click OK.&lt;/li&gt;&lt;li class="spacing"&gt;Enter a name for the database and click                        Save.&lt;/li&gt;&lt;li class="spacing"&gt;Click OK to dismiss the message box.&lt;/li&gt;&lt;li class="spacing"&gt;Open the database to confirm the name                        change.&lt;/li&gt;&lt;/ol&gt;                 &lt;/li&gt;&lt;li class="spacing"&gt;Choose Tools &gt;&gt; Database Utilities &gt;&gt;                    Make MDE File.&lt;/li&gt;&lt;li class="spacing"&gt;Select the database to be converted and click                    Make MDE.&lt;/li&gt;&lt;li class="spacing"&gt;Confirm that the file has been converted to                    MDE and click Save.&lt;/li&gt;&lt;li class="spacing"&gt;Open the new file, and confirm that the Code                    toolbar is disabled and that the application works as expected.&lt;/li&gt; &lt;/ol&gt; Reference URL: &lt;a href="http://www.databasedev.co.uk/microsoft-access-mde.html"&gt;http://www.databasedev.co.uk/microsoft-access-mde.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113328303800598098?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113328303800598098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113328303800598098' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113328303800598098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113328303800598098'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/11/converting-microsoft-access-database.html' title='Converting a Microsoft Access Database to an MDE File'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113223745450201439</id><published>2005-11-17T06:21:00.000-08:00</published><updated>2005-11-17T06:24:15.270-08:00</updated><title type='text'>The InStrRev Function</title><content type='html'>&lt;p&gt;The InStrRev function returns the position of the first occurrence of one  string within another. The search begins from the end of string, but the  position returned counts from the beginning of the string.&lt;/p&gt;   &lt;p&gt;The InStrRev function can return the following values:&lt;/p&gt;   &lt;ul&gt; &lt;li&gt;If string1 is "" - InStrRev returns 0&lt;/li&gt;&lt;li&gt;If string1 is Null - InStrRev returns Null&lt;/li&gt;&lt;li&gt;If string2 is "" - InStrRev returns start&lt;/li&gt;&lt;li&gt;If string2 is Null - InStrRev returns Null&lt;/li&gt;&lt;li&gt;If string2 is not found - InStrRev returns 0&lt;/li&gt;&lt;li&gt;If string2 is found within string1 - InStrRev returns the position at which    match is found&lt;/li&gt;&lt;li&gt;If start &gt; Len(string1) - InStrRev returns 0&lt;/li&gt; &lt;/ul&gt;   &lt;p&gt;&lt;b&gt;Tip:&lt;/b&gt; Also look at the InStr function&lt;/p&gt;   &lt;h3&gt;Syntax&lt;br /&gt;&lt;/h3&gt; &lt;pre&gt;InStrRev(string1,string2[,start[,compare]])&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;table class="ex" border="1" cellpadding="3" cellspacing="0" width="100%"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;th align="left" valign="top" width="20%"&gt;Parameter&lt;/th&gt;     &lt;th align="left" valign="top" width="80%"&gt;Description&lt;/th&gt;   &lt;/tr&gt;     &lt;tr&gt;     &lt;td valign="top"&gt;string1&lt;/td&gt;     &lt;td valign="top"&gt;   Required. The string to be searched&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td valign="top"&gt;string2&lt;/td&gt;     &lt;td valign="top"&gt;   Required. The string expression to search for&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td valign="top"&gt;start&lt;/td&gt;     &lt;td valign="top"&gt;   Optional. Specifies the starting      position for each search. The search begins at the last character position      by default (-1)&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td valign="top"&gt;compare&lt;/td&gt;     &lt;td valign="top"&gt;   Optional. Specifies the string comparison to use.      Default is 0&lt;p&gt;Can      have one of the following values:&lt;/p&gt;     &lt;ul&gt;&lt;li&gt;0 = vbBinaryCompare - Perform a binary comparison&lt;/li&gt;&lt;li&gt;1 = vbTextCompare - Perform a textual comparison&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt; &lt;h3&gt;Example 1&lt;/h3&gt;  &lt;table class="ex" border="1" cellpadding="3" cellspacing="0" width="100%"&gt;    &lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;       &lt;pre&gt;dim txt,pos&lt;br /&gt;txt="This is a beautiful day!"&lt;br /&gt;pos=InStrRev(txt,"his")&lt;br /&gt;document.write(pos)&lt;/pre&gt;       &lt;pre&gt;Output:&lt;/pre&gt;       &lt;pre&gt;2&lt;/pre&gt;     &lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;   &lt;h3&gt;Example 2&lt;/h3&gt;  &lt;table class="ex" border="1" cellpadding="3" cellspacing="0" width="100%"&gt;    &lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;       &lt;pre&gt;dim txt,pos&lt;br /&gt;txt="This is a beautiful day!"&lt;br /&gt;'textual comparison&lt;br /&gt;pos=InStrRev(txt,"B",-1,1)&lt;br /&gt;document.write(pos)&lt;/pre&gt;       &lt;pre&gt;Output:&lt;/pre&gt;       &lt;pre&gt;11&lt;/pre&gt;     &lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;   &lt;h3&gt;Example 3&lt;/h3&gt;  &lt;table class="ex" border="1" cellpadding="3" cellspacing="0" width="100%"&gt;    &lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;       &lt;pre&gt;dim txt,pos&lt;br /&gt;txt="This is a beautiful day!"&lt;br /&gt;'binary comparison&lt;br /&gt;pos=InStrRev(txt,"T")&lt;br /&gt;document.write(pos)&lt;/pre&gt;       &lt;pre&gt;Output:&lt;/pre&gt;       &lt;pre&gt;1&lt;/pre&gt;     &lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;   &lt;h3&gt;Example 4&lt;/h3&gt;  &lt;table class="ex" border="1" cellpadding="3" cellspacing="0" width="100%"&gt;    &lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;       &lt;pre&gt;dim txt,pos&lt;br /&gt;txt="This is a beautiful day!"&lt;br /&gt;'binary comparison&lt;br /&gt;pos=InStrRev(txt,"t")&lt;br /&gt;document.write(pos)&lt;/pre&gt;       &lt;pre&gt;Output:&lt;/pre&gt;       &lt;pre&gt;15&lt;/pre&gt;     &lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;  &lt;h3&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: normal;"&gt;Reference: &lt;a href="http://www.w3schools.com/vbscript/func_instrrev.asp"&gt;http://www.w3schools.com/vbscript/func_instrrev.asp&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/h3&gt; &lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113223745450201439?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113223745450201439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113223745450201439' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113223745450201439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113223745450201439'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/11/instrrev-function.html' title='The InStrRev Function'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113223677365047118</id><published>2005-11-17T06:11:00.000-08:00</published><updated>2005-11-17T06:12:53.750-08:00</updated><title type='text'>Cstr Function</title><content type='html'>Returns an expression that has been converted to a &lt;b&gt;Variant&lt;/b&gt; of subtype &lt;b&gt;String&lt;/b&gt;.&lt;br /&gt;Reference: &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctcstr.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctcstr.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113223677365047118?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113223677365047118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113223677365047118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113223677365047118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113223677365047118'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/11/cstr-function.html' title='Cstr Function'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113223622473586747</id><published>2005-11-17T06:02:00.000-08:00</published><updated>2005-11-17T06:04:09.623-08:00</updated><title type='text'>The Sub-Subform You've Always Wanted</title><content type='html'>Reference url: &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmart03/html/sa03c1.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmart03/html/sa03c1.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt; &lt;p&gt;Peter Heskett&lt;/p&gt; &lt;/i&gt; &lt;p&gt;&lt;b&gt;Access won't let you have a subform within a subform if the data has to be displayed in a continuous form. But necessity is the mother of invention, and Peter Heskett found a way by using senior and junior subforms. He also shares a few other tricks for handling forms.&lt;/b&gt;&lt;/p&gt;   &lt;p&gt;After more than 10 years of developing business systems for clients, I thought I'd done it all. But with one new client, I found myself having to work out a new way of form handling to give them what they wanted.&lt;/p&gt;  &lt;p&gt;My client's distribution business involves four levels of detail. First is the Consignment (Level 1), which consists of a container full of boxes, which the company has to distribute to various destinations in Spain. Each Consignment is broken down into Trips (Level 2), one Trip for each destination in the Consignment. On each Trip the company can deliver to a number of different clients who get a Receipt (Level 3). Each Receipt will include a number of Boxes (Level 4), which are priced according to box type.&lt;/p&gt;  &lt;p&gt;Are you still with me? The traditional solution to this would be to have a Consignment form with a Trips subform, then a drill down to the next level of detail (the Receipt) with, perhaps, a pop-up for Boxes. But that wasn't going to suit this client, who wanted to manage the Trip with its Receipts and related Boxes all on one screen.&lt;/p&gt;  &lt;p&gt;What I needed was a Trip main form with two subforms: one for the customer Receipts and the other for the Boxes to be delivered to the individual customers. The only problem (in Access 97 and 2000) is that you can't have a subform within a subform if the main subform is set to continuous forms. So I had to think of a way to do a senior and a junior subform. In addition, I wanted to be able to pass data from my main form to the subform and from the sub-subform back to the subform.  &lt;a href="http://msdn.microsoft.com/library/en-us/dnsmart03/html/heskettfig1.jpg"&gt;Figure 1&lt;/a&gt; shows the form that I ended up with.&lt;/p&gt;  &lt;p&gt;When you click on the Box button on the form, the Box subform is revealed showing the boxes for that client Receipt (see  &lt;a href="http://msdn.microsoft.com/library/en-us/dnsmart03/html/heskettfig2.jpg"&gt;Figure 2&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;I encountered a number of problems in getting to this solution. In overcoming all of them, I used Access tools to the fullest and kept the programming as simple as possible. My solution may not be scalable if you're displaying lots of records, but the solution was quick to implement. It will also appeal to those of you who like using code behind your forms and have other things to do apart from programming.&lt;/p&gt;  &lt;p&gt;The main problems that I had to overcome included:&lt;/p&gt;  &lt;ul&gt; &lt;li&gt;Getting the client pick list to show just the clients in a particular   location.&lt;/li&gt;&lt;li&gt;Displaying the full client name as a ToolTip-like pop-up (the client   information displayed on the form isn't enough to identify the client to the   user).&lt;/li&gt;&lt;li&gt;Determining how to get the Box subform to relate to the individual   client that was selected in the Receipt subform.&lt;/li&gt;&lt;li&gt;Getting the Box subform to calculate costs based on standard prices   attached to the individual customer records.&lt;/li&gt;&lt;li&gt;Getting the totals from the Box subform into the client Receipt   subform.&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Limiting combo boxes&lt;/h3&gt; It's easy enough to load a combo box at design time. It's more of a problem to change the pick list for each record at runtime depending on the values on the form. To do this you need to set the Row Source of the combo box in two places: &lt;ol&gt; &lt;li&gt; In the AfterUpdate event of the key field (in this case, Destination).&lt;/li&gt;&lt;li&gt; When you open a form with the Destination already defined, in the Form's   OnCurrent event.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;The code that I used behind the Trip's Current event was:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Private Sub Form_Current()&lt;br /&gt;If Not IsNull(Me.DestinationID) Then&lt;br /&gt;   Me.TripReceiptSub.Form.ClientRef.RowSource = _&lt;br /&gt;                                   "qryClientPick"&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;A similar piece of code is required in the AfterUpdate event. When setting the row source in the AfterUpdate, you have to save the record before you can set the new value for the list box's RowSource:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Private Sub DestinationID_AfterUpdate()&lt;br /&gt;   DoCmd.DoMenuItem acFormBar, acRecordsMenu, _&lt;br /&gt;                 acSaveRecord, , acMenuVer70&lt;br /&gt;   Me.TripReceiptSub.Form.ClientRef.RowSource = _&lt;br /&gt;                 "qryClientPick"&lt;br /&gt;End Sub&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;In this case, I've used the same query every time—qryClientPick (which is shown in  &lt;a href="http://msdn.microsoft.com/library/en-us/dnsmart03/html/heskettfig3.jpg"&gt;Figure 3&lt;/a&gt;). The query uses the value on the form as part of its criteria ([forms]![trip]![destinationID]) to regenerate the list box based on the value in the destinationID text box.&lt;/p&gt;  &lt;h3&gt;Creating your own ToolTip&lt;/h3&gt; In a continuous form, unbound controls like ToolTips don't really work. Yet I wanted to display the client name on the continuous form as a kind of ToolTip when the user moves over the ClientRef text box. This required me to carry the client name as a data field on the table for Receipts. This is how I set up my ToolTip-like display: &lt;ol&gt; &lt;li&gt; Insert a bound text box, named Company, into the subform with a light   background color (say, 14286847). Set the text box's Visible property to   False.&lt;/li&gt;&lt;li&gt; Add a label called LabelCompany, with text to tell the user to click   here to make the tip invisible.&lt;/li&gt;&lt;li&gt; On the mouse move event of the ClientRef, add code to display the   company name text box:&lt;/li&gt; &lt;/ol&gt;  &lt;pre&gt;&lt;code&gt;Private Sub ClientRef_MouseMove&lt;br /&gt;If Not IsNull(Me.ClientRef) Then&lt;br /&gt;   If Me.Company.Visible = False Then&lt;br /&gt;       Me.Company.Visible = True&lt;br /&gt;       Me.LabelCompany.Visible = True&lt;br /&gt;   End If&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;ol start="4"&gt; &lt;li&gt; On the Click event of Company, add some code to switch the ToolTip off.   You need to put the focus somewhere else before you can set the Visible   property to False. This is the code that I used:&lt;/li&gt; &lt;/ol&gt;  &lt;pre&gt;&lt;code&gt;Private Sub Company_Click()&lt;br /&gt; Me.Notes.SetFocus&lt;br /&gt; Me.Company.Visible = False&lt;br /&gt; Me.LabelCompany.Visible = False&lt;br /&gt;End Sub&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;h3&gt;Linking the sub-subform&lt;/h3&gt; Given the restrictions of Access, I set up a senior and a junior subform, both linked in a master-child relationship to the Level 1 Trip form. &lt;p&gt;TripReceiptSub is the senior subform and is linked to the main Trip form by TripID. TripBoxSub is the junior subform and is linked to the Trip form by the ReceiptID. The Trip form doesn't have a bound ReceiptID. Rather, when you click the Box button on the main subform, it places a value into an unbound ReceiptID field on the Main Trip form—which will drive the TripBoxSub (see  &lt;a href="http://msdn.microsoft.com/library/en-us/dnsmart03/html/heskettfig4.jpg"&gt;Figure 4&lt;/a&gt;). Effectively, TripBoxSub becomes a subform of the TripReceiptSub form.&lt;/p&gt;  &lt;p&gt;The code to do this is behind the Box button:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Private Sub btnbox_Click()&lt;br /&gt;' save the record first&lt;br /&gt;DoCmd.DoMenuItem acFormBar, acRecordsMenu, _&lt;br /&gt;                  acSaveRecord, , acMenuVer70&lt;br /&gt;Me.Parent.ReceiptID = Me.ReceiptID&lt;br /&gt;Me.Parent.ClientRef = Me.ClientRef&lt;br /&gt;Me.Parent.TripBoxSub.Requery&lt;br /&gt;Me.Parent.TripBoxSub.Visible = True&lt;br /&gt;Me.Parent.BoxHide.Visible = False&lt;br /&gt;Me.Parent.TripBoxSub.SetFocus&lt;br /&gt;Me.Parent.TripBoxSub.Form.Company = Me.Company&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;The junior subform needs to be requeried so that it will link to the new ReceiptID and display just the records for that ReceiptID. The Link Child Fields and the Link Master Fields properties of the junior subform must be set to ReceiptID.&lt;/p&gt;  &lt;h3&gt;Using data from the main record&lt;/h3&gt; Now that I had all my forms synchronized, I needed to use data from the record underlying the main form in my sub-subform. I got around this problem by using the ClientRef combo box on the senior subform. In the qryClientPick you may have noticed a number of extra columns for prices. These are the standard prices the individual clients usually pay. &lt;p&gt;To make these prices available, I have some unbound price text boxes on the main form. I use the Column property of the list box to set the values for these text boxes. When the user clicks the red Box button, this code transfers the prices from the selected entry in the list box to the unbound fields on the form:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;On Error Resume Next&lt;br /&gt;Me.Parent.PriceBig = Me.ClientRef.Column(3)&lt;br /&gt;Me.Parent.PriceNorm = Me.ClientRef.Column(4)&lt;br /&gt;Me.Parent.PriceSmall = Me.ClientRef.Column(5)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;The On Error Resume Next is the neatest way of stopping unwanted error messages, should the system find a null value in a column and be unable to set it. Access considers the first column in a combo list as column(0), which is why PriceBig, which is in the fourth column, is referred to as Column(3), and so on.&lt;/p&gt;  &lt;p&gt;For this to work, the properties of the Client Ref combo box should be set as shown in  &lt;a href="http://msdn.microsoft.com/library/en-us/dnsmart03/html/heskettfig5.jpg"&gt;Figure 5&lt;/a&gt;. In particular, it's important that the number of columns match the number of columns in the query.&lt;/p&gt;  &lt;p&gt;Once I had the standard prices on the main form, I picked them up in the AfterUpdate event of the BoxType text box. There are only three different types of box, so I just hard-coded the routine to retrieve the right price:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Private Sub BoxType_AfterUpdate()&lt;br /&gt;On Error Resume Next&lt;br /&gt;If Me.BoxType = "Big" Then&lt;br /&gt;       Me.Price = Me.Parent.PriceBig&lt;br /&gt;   ElseIf Me.BoxType = "Normal" Then&lt;br /&gt;       Me.Price = Me.Parent.PriceNorm&lt;br /&gt;   ElseIf Me.BoxType = "Small" Then&lt;br /&gt;       Me.Price = Me.Parent.PriceSmall&lt;br /&gt;End If&lt;br /&gt;SubValue&lt;br /&gt;End Sub&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;My SubValue routine that calculates the totals is very simple. I called a subroutine because I calculated Prices numerous times in the application:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Private Sub SubValue()&lt;br /&gt;If Me.Quantity &gt; 0 And Me.Price &gt; 0 Then&lt;br /&gt;   Me.Value = Me.Quantity * Me.Price&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;h3&gt;Updating the senior subform&lt;/h3&gt; But I had another problem: I needed to update my senior subform with the totals generated by the records in the junior subform. In other words, I wanted to pass data from the sub-subform back to the subform. The obvious way to do this was to take the totals in the footer of the subform and update the relevant Receipts record. But this only works if the user saves the record before updating, which doesn't always happen. So to make this happen, I needed some proper code. &lt;p&gt;First, I needed to loop through the records in the table that underlies the junior subform (Boxtbl). I only wanted the records that related to the selected ReceiptID and calculated the total, which I held in variables for later use:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Private Sub btnAct_Click()&lt;br /&gt;DoCmd.DoMenuItem acFormBar, acRecordsMenu, _&lt;br /&gt;                    acSaveRecord, , acMenuVer70&lt;br /&gt;Dim iChk As String&lt;br /&gt;Dim db As DATABASE&lt;br /&gt;Dim rs As Recordset&lt;br /&gt;Dim rc As Recordset&lt;br /&gt;Dim iTotb as Long   ' boxes&lt;br /&gt;Dim iTotv As Double   ' value&lt;br /&gt;&lt;br /&gt;Set db = CurrentDb()&lt;br /&gt;Set rc = db.OpenRecordset("Select * from Boxtbl " &amp; _&lt;br /&gt; "Where receiptID = '" &amp;amp; Me.Parent.ReceiptID &amp; " ' ")&lt;br /&gt;&lt;br /&gt;If rc.BOF And rc.EOF Then&lt;br /&gt;       ' No Records&lt;br /&gt;   Else      &lt;br /&gt;     iTotb = 0&lt;br /&gt;     iTotv = 0&lt;br /&gt;   While Not rc.EOF&lt;br /&gt;      iTotb = iTotb + Nz(rc("quantity"))  ' boxes&lt;br /&gt;      iTotv = iTotv + Nz(rc("value"))&lt;br /&gt;      rc.MoveNext&lt;br /&gt;   Wend&lt;br /&gt;End If&lt;br /&gt;rc.Close&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;With new totals calculated and held in the variables iTotb and iTotv, I update the record underlying the senior subform with this code:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Set rs = db.OpenRecordset( _&lt;br /&gt;   "Select * from Receiptbl " &amp;amp; _&lt;br /&gt;   "Where ReceiptID = '" &amp; Me.ReceiptID &amp;amp; " ' ")&lt;br /&gt;   rs.Edit&lt;br /&gt;       rs("BoxTotal") = iTotb&lt;br /&gt;       rs("ValueTotal") = iTotv&lt;br /&gt;   rs.Update&lt;br /&gt;   rs.Close&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;p&gt;The final step is to requery the senior subform to pick up the new totals from the table:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;Me.Parent.TripReceiptSub.Requery&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  &lt;h3&gt;DAO references&lt;/h3&gt; In the sample database, I've used DAO code, which will work for all versions of Access. But if you're using Access 2000, you'll need to set the module References in Access 2000 to include DAO. To do this, open a module and select Tools and then References, and scroll down and click on Microsoft DAO 3.51 or 3.6. You'll then need to close the References dialog and open it again to check where the DAO reference is positioned. The DAO needs to be third in the list if it's going to take precedence and work properly. &lt;p&gt;With this code, my client was able to do most of what they had to do on just the one form. Since doing this, I've incorporated this sub-subform method in another client system, and have plans for more. I hope you find it as useful as I do.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Download &lt;/b&gt; &lt;a href="http://download.microsoft.com/download/5/c/c/5cc1e311-4711-4dbd-9529-28e3520fba0b/SubSbFrm.EXE"&gt;&lt;b&gt;SUBSBFRM.exe&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p&gt;&lt;span style="font-size:-2;"&gt;To find out more about Smart Access and Pinnacle Publishing, visit their website at  &lt;a href="http://www.pinpub.com/html/main.isx?sub=57" target="_new"&gt;http://www.pinpub.com/html/main.isx?sub=57&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p&gt;&lt;span style="font-size:-2;"&gt;Note: This is not a Microsoft Corporation website. Microsoft is not responsible for its content.&lt;/span&gt;&lt;/p&gt;    &lt;p&gt;&lt;span style="font-size:-2;"&gt;This article is reproduced from the March 2003 issue of Smart Access. Copyright 2003, by Pinnacle Publishing, Inc., unless otherwise noted. All rights are reserved. Smart Access is an independently produced publication of Pinnacle Publishing, Inc. No part of this article may be used or reproduced in any fashion (except in brief quotations used in critical articles and reviews) without prior consent of Pinnacle Publishing, Inc. To contact Pinnacle Publishing, Inc., please call 1-800-788-1900.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113223622473586747?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113223622473586747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113223622473586747' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113223622473586747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113223622473586747'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/11/sub-subform-youve-always-wanted.html' title='The Sub-Subform You&apos;ve Always Wanted'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113218202201509868</id><published>2005-11-16T14:55:00.000-08:00</published><updated>2005-11-16T15:00:42.173-08:00</updated><title type='text'>Creating autonumbered Field in DDL</title><content type='html'>&lt;span style="font-size:100%;"&gt;Here's how you can create an autonumbered field in Data Defination Language or DDL:&lt;br /&gt;Sample:&lt;br /&gt;&lt;/span&gt; &lt;pre class="in_text"&gt;&lt;span style="font-size:100%;"&gt;CREATE TABLE tblTarget2&lt;br /&gt;   (TargetID COUNTER CONSTRAINT PrimaryKey PRIMARY KEY,&lt;br /&gt;   [PECID] Long,&lt;br /&gt;   [BS] Long,&lt;br /&gt;   [D] Long,&lt;br /&gt;   [D1] Long,&lt;br /&gt;   [MPS] Long,&lt;br /&gt;   [D2] Long,&lt;br /&gt;   PEC TEXT(8),&lt;br /&gt;   Email TEXT(50))&lt;br /&gt;&lt;br /&gt;This sample will create a table called tblTarget2 with the&lt;br /&gt;TargetID field set as primary key and automated counter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html;charset=UTF-8"&gt;&lt;title&gt;tblTarget&lt;/title&gt;&lt;table bg border="1" cellspacing="0" style="color:#ffffff;"&gt;&lt;span style="font-family:Verdana;color:#000000;"&gt;&lt;/span&gt;&lt;caption&gt;&lt;b&gt;tblTarget2&lt;/b&gt;&lt;/caption&gt;  &lt;thead&gt; &lt;tr&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;TargetID&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;PECID&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;BS&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;D&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;D1&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;MPS&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;D2&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;PEC&lt;/span&gt;&lt;/th&gt; &lt;th border bg style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;Email&lt;/span&gt;&lt;/th&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr valign="top"&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;1&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;1&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr valign="top"&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;2&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;2&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr valign="top"&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;3&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;3&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border align="right" style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt; &lt;td border style="color:#c0c0c0;"&gt;&lt;span style="font-size: 8pt;font-family:Verdana;color:#000000;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt; &lt;tfoot&gt;&lt;/tfoot&gt; &lt;/table&gt;&lt;br /&gt;Reference: &lt;a href="http://support.microsoft.com/?id=116145"&gt;http://support.microsoft.com/?id=116145&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113218202201509868?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113218202201509868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113218202201509868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113218202201509868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113218202201509868'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/11/creating-autonumbered-field-in-ddl.html' title='Creating autonumbered Field in DDL'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113201892644108110</id><published>2005-11-14T17:41:00.000-08:00</published><updated>2005-11-14T17:42:06.453-08:00</updated><title type='text'>Using MySQL from Microsoft Access</title><content type='html'>&lt;p&gt;You can use Microsoft Access to exchange data with a database on MySQL. This   provides very convenient mechanisms for both populating your database initially,   and for keeping it up to date. If you have existing data in an Access database,   an Excel spreadsheet, or a delimited text file, this can be read into Microsoft   Access and exported to your database on the MySQL server. Before you can use   Access with MySQL, you must first have set up a Data Source for your MySQL   database.     Details of how to do this can be found at &lt;a href="http://www.ucl.ac.uk/is/mysql/odbc/"&gt;Using MySQL with      ODBC&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The example described here uses Microsoft Access 97, which was provided    on Staff WTS version 1. Working with later versions of Access is essentially   the same, but may appear slightly differently on the screen, and some menu   item names have changed in later versions of Access.&lt;/p&gt;  &lt;h3&gt;Exporting a database table&lt;/h3&gt;  &lt;p&gt;This example assumes you have already created a simple database with a single    table such as the following. The table has a unique primary key &lt;strong&gt;student_id&lt;/strong&gt;.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;More info: &lt;a href="http://www.ucl.ac.uk/is/mysql/access/"&gt;http://www.ucl.ac.uk/is/mysql/access/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113201892644108110?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113201892644108110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113201892644108110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113201892644108110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113201892644108110'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/11/using-mysql-from-microsoft-access.html' title='Using MySQL from Microsoft Access'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-113060157256886346</id><published>2005-10-29T08:57:00.000-07:00</published><updated>2005-10-29T08:59:32.596-07:00</updated><title type='text'>Importing Objects into MS Access</title><content type='html'>&lt;div class="notice"&gt;This article was previously published under Q298174&lt;/div&gt; &lt;div class="notice"&gt;Moderate: Requires basic macro, coding, and interoperability skills.&lt;br /&gt;&lt;br /&gt;This article applies only to a Microsoft Access database (.mdb).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click &lt;b&gt;References&lt;/b&gt; on the &lt;b&gt;Tools&lt;/b&gt; menu in the Visual Basic Editor, and make sure that the &lt;b&gt;Microsoft DAO 3.6 Object Library&lt;/b&gt; check box is selected.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;h2 class="subTitle"&gt;SUMMARY&lt;/h2&gt; &lt;div class="sbody"&gt; This article describes how you can use Data Access Objects (DAO) to import all objects from one Microsoft Access database into the current Access database. In some situations, this code can be used to recover database objects from a corrupted or damaged database that can be opened but cannot be compacted successfully. This code does not import the following elements: &lt;table class="list ul"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;References&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;Import/Export specifications&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;Security information (user and group permissions)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;  The current user (typically the administrator) becomes the owner of all imported objects. &lt;/div&gt; &lt;h2 class="subTitle"&gt;MORE INFORMATION&lt;/h2&gt; Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:  &lt;div class="indent"&gt;&lt;a href="http://www.microsoft.com/partner/referral/"&gt;http://www.microsoft.com/partner/referral/&lt;/a&gt;&lt;span class="pLink"&gt; (http://www.microsoft.com/partner/referral/)&lt;/span&gt;&lt;/div&gt; For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site: &lt;a href="http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms"&gt;http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS&lt;/a&gt;&lt;a href="http://support.microsoft.com/?kbid=298174"&gt;&lt;br /&gt;&lt;/a&gt;For more info:&lt;br /&gt; &lt;a href="http://support.microsoft.com/?kbid=298174"&gt;http://support.microsoft.com/?kbid=298174&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-113060157256886346?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/113060157256886346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=113060157256886346' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113060157256886346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/113060157256886346'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/importing-objects-into-ms-access.html' title='Importing Objects into MS Access'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112983548533675285</id><published>2005-10-20T12:10:00.000-07:00</published><updated>2005-10-20T12:11:25.350-07:00</updated><title type='text'>Inside Microsoft Access Date/Time Fields</title><content type='html'>&lt;p&gt;Malcolm Stewart&lt;br /&gt;Systems Support Engineer, Microsoft Access&lt;/p&gt;   &lt;p&gt;Created: July 7, 1993&lt;/p&gt;   &lt;h2 class="dtH1"&gt;Abstract&lt;/h2&gt;   &lt;p&gt;This article explains how Microsoft® Access® stores dates and times so that you can do date/time manipulations that are not covered by the many date/time functions in Microsoft Access.&lt;/p&gt;   &lt;h2 class="dtH1"&gt;Introduction&lt;/h2&gt;   &lt;p&gt;When you use Date/Time fields in Microsoft® Access®, you will find a wealth of functions provided to manipulate dates and times in various ways. But if you want to do something that these functions don't support, you will need an understanding of how Microsoft Access stores dates and times in order to do your own Date/Time calculations.&lt;/p&gt;   &lt;p&gt;The Microsoft Access Date/Time data type is both simple and powerful in its implementation. Although Microsoft Access can present a date or time to you in several different formats, internally they are stored as double precision numbers.&lt;/p&gt;   &lt;h2 class="dtH1"&gt;Dates&lt;/h2&gt;   &lt;p&gt;In order to be able to store a date as a number, the date has to be converted to something other than the standard calendar format. The numeric representation of dates is called a Julian, or Serial, date. To do this, the date is converted to an offset from a fixed point in time.&lt;/p&gt;   &lt;p&gt;In the case of Microsoft Access, day 0 is 12/30/1899, and all dates are stored as the number of days since this date. Thus 7/7/93 is stored as 34157, meaning 34,157 days since 12/30/1899. Negative numbers represent dates prior to 12/30/1899. Storing Serial dates is what makes Date/Time a powerful data type that is easy to manipulate.&lt;/p&gt;   &lt;p&gt;Because dates are stored as numbers, you can subtract two dates to find the number of days between them, or add a number and a date together to find another date either in the future or the past. Try the following examples in the Immediate window of a module.&lt;/p&gt;   &lt;p&gt;Find the number of days since the beginning of the year:&lt;/p&gt;   &lt;pre class="code"&gt;Print #7/7/93# - #1/1/93#&lt;br /&gt;187&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Find the date 45 days in the future:&lt;/p&gt;   &lt;pre class="code"&gt;Print #7/7/93# + 45&lt;br /&gt;8/21/93&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Find the date two weeks ago:&lt;/p&gt;   &lt;pre class="code"&gt;Print #7/7/93# - 14&lt;br /&gt;6/23/93&lt;br /&gt;&lt;/pre&gt;   &lt;h2 class="dtH1"&gt;Times&lt;/h2&gt;   &lt;p&gt;Times are also stored numerically. Since adding 1 to a date represents 1 day or 24 hours, each hour is stored as .041666..., or 1/24 of a day. In Microsoft Access all times are stored as a fraction of a day. Each hour is 1/24 of a day, each minute 1/1440, each second 1/86400. So 3:00 is stored as .125 (or 1/8 of a day), and 16:00 is stored as 0.666..., (or 2/3 of a day). Conversely, 0.2 represents 4:48 hours (1/5 of a day), and so on.&lt;/p&gt;   &lt;p&gt;As with dates, you can add and subtract times. Try the following examples in the Immediate window of a module.&lt;/p&gt;   &lt;p&gt;Add a time interval:&lt;/p&gt;   &lt;pre class="code"&gt;Print #1:45PM# + #3:27#&lt;br /&gt;5:12:00 PM&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Subtract a time interval:&lt;/p&gt;   &lt;pre class="code"&gt;Print #1:45PM# - #4:06#&lt;br /&gt;9:39:00 AM&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Add two intervals:&lt;/p&gt;   &lt;pre class="code"&gt;Print #6:57# + #7:45#&lt;br /&gt;2:42:00 PM&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Note that in the last example, the internal data is correct but the default format is not appropriate for the calculation. Microsoft Access displays the result using the 12-hour default format, instead of a 24-hour format. You can use the Format function to force the correct format, or on a form or report, you can set the Format property of the field to "Short Time" in order to display using the 24 hour format.&lt;/p&gt;   &lt;p&gt;Add two intervals that exceed 24 hours:&lt;/p&gt;   &lt;pre class="code"&gt;Print #15:45# + #12:02#&lt;br /&gt;12/31/1899 3:47:00 AM&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;The result should be 1 day and 3:47 hours. Internally, the interval is stored correctly. However, Access has no format to display the "1" as "1 Day", so the "1" is displayed as a date, namely 12/31/1899 (1 day after 12/30/1899).&lt;/p&gt;   &lt;h2 class="dtH1"&gt;Intervals&lt;/h2&gt;   &lt;p&gt;This brings to light an interesting feature about dates and times in Microsoft Access. Midnight is represented by .0, which means that 34,157 is the same as 34,157.0 or 7/7/93 0:00. Also, 0 represents 12/30/1899, so .125 is the same as 0.125 or 12/30/1899 3:00 a.m. Access normally suppresses displaying the time component if 0, and suppresses displaying the date component if 0, thus giving the appearance that dates and times are independent of each other.&lt;/p&gt;   &lt;p&gt;When displaying time intervals of greater than 24 hours, the date portion is no longer 0 and Access will default to displaying a date. We can overcome this limitation of the Date/Time data type in one of two ways: The first is to treat the interval as a decimal value rather than a Date/Time value, as shown in the following examples.&lt;/p&gt;   &lt;p&gt;Add two intervals and display as a decimal number of days:&lt;/p&gt;   &lt;pre class="code"&gt;Print format(#15:45# + #12:02#,"#.00") &amp; " Days"&lt;br /&gt;1.16 Days&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Add two intervals and display as a decimal number of hours:&lt;/p&gt;   &lt;pre class="code"&gt;Print format((#15:45# + #12:02#)*24,"#.0" &amp;amp; " Hours"&lt;br /&gt;27.8 Hours&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Add two intervals and display as a decimal number of minutes:&lt;/p&gt;   &lt;pre class="code"&gt;Print format((#15:45# + #12:02#)*1440,"#") &amp; " Minutes"&lt;br /&gt;1667 Minutes&lt;br /&gt;&lt;/pre&gt;   &lt;blockquote class="dtBlock"&gt; &lt;b class="le"&gt;Note&lt;/b&gt;&lt;code&gt;   &lt;/code&gt;The ".00" and ".0" in the formats above tell Microsoft Access how many decimal places to display. The "#" in the format represents the integer portion of the number.&lt;/blockquote&gt;   &lt;p&gt;The second way to overcome the limitation is to use a custom function to treat the number of days as a decimal value, and the remainder as a time value. The following function will display the interval correctly:&lt;/p&gt;   &lt;pre class="code"&gt; Function DaysHoursMinutes (Interval)&lt;br /&gt;  Dim Days As Long, Remainder As Double&lt;br /&gt;  Days = CLng(Interval)&lt;br /&gt;  Remainder = Interval - Days&lt;br /&gt;*  DaysHoursMinutes = Days &amp; IIf(Days = 1, " Day ", " Days ") &amp;amp;&lt;br /&gt;*                     Format(Remainder, "h:mm") &amp; " Hours"&lt;br /&gt;End Function&lt;br /&gt;&lt;/pre&gt;   &lt;blockquote class="dtBlock"&gt; &lt;b class="le"&gt;Note&lt;/b&gt;&lt;code&gt;   &lt;/code&gt;Lines marked with &lt;b&gt;*&lt;/b&gt; need to be entered as a single line in Access Basic.&lt;/blockquote&gt;   &lt;p&gt;Add two intervals and apply custom formatting:&lt;/p&gt;   &lt;pre class="code"&gt;Print DaysHoursMinutes(#15:45# + #12:02#)&lt;br /&gt;1 Day 3:47 Hours&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;The same formatting principles illustrated in the previous example are also useful when applied to intervals calculated as the difference between two Date/Time values.&lt;/p&gt;   &lt;p&gt;Calculate elapsed time as a decimal number of days:&lt;/p&gt;   &lt;pre class="code"&gt;Print #7/7/93 6:45PM# - #7/3/93 8:15PM# &amp; " Days"&lt;br /&gt;3.9375 Days&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Display the elapsed time as a decimal number of hours:&lt;/p&gt;   &lt;pre class="code"&gt;Print (#7/7/93 6:45PM# - #7/3/93 8:15PM#)*24 &amp;amp; " Hours"&lt;br /&gt;94.5 Hours&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Display the elapsed time as a decimal number of minutes:&lt;/p&gt;   &lt;pre class="code"&gt;Print (#7/7/93 6:45PM# - #7/3/93 8:15PM#)*1440 &amp; " Minutes"&lt;br /&gt;5670 Minutes&lt;br /&gt;&lt;/pre&gt;   &lt;p&gt;Display the elapsed time using the &lt;b&gt;DaysHoursMinutes&lt;/b&gt; function:&lt;/p&gt;   &lt;pre class="code"&gt;Print DaysHoursMinutes(#7/7/93 6:45PM# - #7/3/93 8:15PM#)&lt;br /&gt;4 Days 1:30 Hours&lt;br /&gt;&lt;/pre&gt;   &lt;blockquote class="dtBlock"&gt; &lt;b class="le"&gt;Note&lt;/b&gt;&lt;code&gt;   &lt;/code&gt;When calculating the difference between Date/Time values, Microsoft Access defaults to a numeric format rather than a Date/Time format.&lt;/blockquote&gt;   &lt;h2 class="dtH1"&gt;Conclusion&lt;/h2&gt;   &lt;p&gt;This covers the internals of Date/Time fields in Microsoft Access. By building on these examples and using the built-in Date/Time functions, you can create powerful date, time, and interval manipulation functions for your own database.&lt;/p&gt;   &lt;h2 class="dtH1"&gt;16th-Century Calendar Revision&lt;/h2&gt;   &lt;p&gt;A side note: In the 16th century, the calendar was revised and lost about 11 days. In Microsoft Access, the conversion between serial dates and calendar dates does not take this gap into account. The only real effect of this is that (a) you can enter the 11 dates that never existed, and (b) you can't do accurate date math if the dates span this range:&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_datetime.asp"&gt;&lt;br /&gt;For more info&lt;/a&gt;:&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112983548533675285?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112983548533675285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112983548533675285' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112983548533675285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112983548533675285'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/inside-microsoft-access-datetime.html' title='Inside Microsoft Access Date/Time Fields'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112923171023955144</id><published>2005-10-13T12:26:00.000-07:00</published><updated>2005-10-13T12:40:44.530-07:00</updated><title type='text'>How to Display Line Numbers on Subform Records</title><content type='html'>&lt;div class="notice"&gt;&lt;span style="font-size:85%;"&gt;This article was previously published under Q210340&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt; Advanced: Requires expert coding, interoperability, and multiuser skills.&lt;br /&gt;&lt;br /&gt;This article applies only to a Microsoft Access database (.mdb).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;h2 class="subTitle"&gt;&lt;span style="font-size:85%;"&gt;SUMMARY&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-size:85%;"&gt;  This article shows you how to create and use a procedure to display the current line or row number in a subform.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: This article explains a technique demonstrated in the sample file, FrmSmp00.mdb. For information about how to obtain this sample file, please see the following article in the Microsoft Knowledge Base: &lt;/span&gt;&lt;div class="indent"&gt;&lt;span style="font-size:85%;"&gt;&lt;a class="KBlink" href="http://support.microsoft.com/kb/233324/EN-US/"&gt;233324&lt;/a&gt;&lt;/span&gt;&lt;span class="pLink"  style="font-size:85%;"&gt; (http://support.microsoft.com/kb/233324/EN-US/)&lt;/span&gt;&lt;span style="font-size:85%;"&gt; Microsoft Access 2000 Sample Reports Available in Download Center &lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;h2 class="subTitle"&gt;&lt;span style="font-size:85%;"&gt;MORE INFORMATION&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-size:85%;"&gt;  The following examples demonstrate how to create and use the sample function, GetLineNumber().&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click &lt;b&gt;References&lt;/b&gt;&lt;b&gt;Tools&lt;/b&gt; menu in the Visual Basic Editor, and make sure that the &lt;b&gt;Microsoft DAO 3.6 Object Library&lt;/b&gt; check box is selected.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; on the  &lt;table class="list ol"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td class="number"&gt;&lt;span style="font-size:85%;"&gt;1.&lt;/span&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;span style="font-size:85%;"&gt;Open the sample database Northwind.mdb.       &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;&lt;span style="font-size:85%;"&gt;2.&lt;/span&gt;&lt;/td&gt;&lt;td class="text"&gt;&lt;span style="font-size:85%;"&gt;Create a module and type the following line in the Declarations section:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt; Option Explicit&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: times new roman;font-size:100%;" &gt;3.Type the following procedure:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;Function GetLineNumber (F As Form, KeyName As String,&lt;br /&gt;KeyValue)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;       &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Dim RS As DAO.Recordset&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim CountLines&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;On Error GoTo Err_GetLineNumber&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Set RS = F.RecordsetClone&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;' Find the current record.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Select Case RS.Fields(KeyName).Type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;' Find using numeric data type key value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;Case dbInteger, dbLong, dbCurrency, dbSingle, dbDouble, dbByte&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size:85%;"&gt;RS.FindFirst "[" &amp; KeyName &amp;amp; "] = " &amp; KeyValue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;' Find using date data type key value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;Case dbDate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size:85%;"&gt;RS.FindFirst "[" &amp; KeyName &amp;amp; "] = #" &amp; KeyValue &amp;amp; "#"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;' Find using text data type key value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;Case dbText&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size:85%;"&gt;RS.FindFirst "[" &amp; KeyName &amp;amp; "] = '" &amp; KeyValue &amp;amp; "'"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;Case Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size:85%;"&gt;MsgBox "ERROR: Invalid key field data type!"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size:85%;"&gt;Exit Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;End Select&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;' Loop backward, counting the lines.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Do Until RS.BOF&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;CountLines = CountLines + 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size:85%;"&gt;RS.MovePrevious&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;st1:place&gt;Loop&lt;/st1:place&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Bye_GetLineNumber:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;' Return the result.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;GetLineNumber = CountLines&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Exit Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Err_GetLineNumber:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;CountLines = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 9pt;"&gt;&lt;span style="font-size:85%;"&gt;Resume Bye_GetLineNumber&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;End Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt; The GetLineNumber() function requires the following three parameters:  &lt;/p&gt; &lt;table class="list ul"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;The form object on which to place line numbers. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;The name of the unique key field in the subform's underlying table. If the record source does not have a single unique key field, add a field with an AutoNumber data type to the underlying table for this purpose. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;The current key field value. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;  You can use the following sample expression as the &lt;b&gt;ControlSource&lt;/b&gt; property setting of a text box on a subform, if the subform's underlying table has a field called &lt;b&gt;ID&lt;/b&gt; as its unique key field:&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;=GetLineNumber(Form,"ID",[ID])&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; &lt;h3&gt;How to Use the GetLineNumber() Function&lt;/h3&gt; &lt;b&gt;CAUTION&lt;/b&gt;: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.&lt;br /&gt;&lt;br /&gt;1.Open the Order Details table in Design view, add the following field to the table, and then save the table:&lt;br /&gt;&lt;pre class="in_text"&gt;   Field Name: ID&lt;br /&gt;  Data Type:  AutoNumber&lt;/pre&gt;  This field will serve as the required single unique field for the table.&lt;br /&gt;&lt;br /&gt;&lt;table class="list ol"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td class="number"&gt;2.&lt;/td&gt;&lt;td class="text"&gt;Open the Order Details Extended query in Design view, add the ID field from the Order Details table to the query grid, and then save the query. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;3.&lt;/td&gt;&lt;td class="text"&gt;Open the Orders Subform form in Design view and add the following text box to the form:&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt;  Name: LineNum&lt;br /&gt;&lt;pre class="in_text"&gt;ControlSource: =GetLineNumber([Form], "ID", [ID])&lt;/pre&gt; &lt;table class="list ol"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td class="number"&gt;4.&lt;/td&gt;&lt;td class="text"&gt;On the &lt;b&gt;View&lt;/b&gt; menu, click &lt;b&gt;Tab Order&lt;/b&gt;. Drag the LineNum field from the bottom of the Custom Order list to the top, and then click &lt;b&gt;OK&lt;/b&gt;. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;5.&lt;/td&gt;&lt;td class="text"&gt;Save and close the Orders Subform. &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="number"&gt;6.&lt;/td&gt;&lt;td class="text"&gt;Open the Orders form in Form view and move to a record with multiple order line items. Note that the LineNum text box displays the record number for each product in the order.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt; &lt;/table&gt; &lt;pre class="code"&gt;Reference URL: &lt;a href="http://support.microsoft.com/?kbid=210340"&gt;http://support.microsoft.com/?kbid=210340&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt; &lt;pre class="code"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112923171023955144?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112923171023955144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112923171023955144' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112923171023955144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112923171023955144'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/how-to-display-line-numbers-on-subform.html' title='How to Display Line Numbers on Subform Records'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112915533558686078</id><published>2005-10-12T15:13:00.000-07:00</published><updated>2005-10-12T15:15:35.596-07:00</updated><title type='text'>Importing Data from and External Database</title><content type='html'>Reference URL: &lt;a href="http://archive.baarns.com/access/faq/ad_quer.asp"&gt;http://archive.baarns.com/access/faq/ad_quer.asp&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt; &lt;p&gt;There are three ways to refer to data sources physically located outside an Access database in a SQL statement:   &lt;/p&gt; &lt;ol&gt; &lt;li&gt;Use linked tables&lt;/li&gt;&lt;li&gt;Use the IN clause&lt;/li&gt;&lt;li&gt;Use direct references to the external tables&lt;/li&gt; &lt;/ol&gt;   &lt;p&gt;The most efficient and easiest way to reference external tables is to use linked tables. Sometimes though the linking must be done dynamically by the user because data sources are always changing. This situation arises when polling for data for summary or collection. Another situation prohibits altogether the dynamic linking or importing of tables. This arises when users are using an Access 2.0 database in an Access 95 environment. Unless the database is converted, users cannot create new objects, thus eliminating linking or importing tables.&lt;/p&gt;   &lt;p&gt;A simple solution to this would be prompting the user for the name and location of the datasource via a common dialog or input box. Then execute dynamic SQL which would append the data to a preexisting table.&lt;/p&gt;   &lt;p&gt;Since a dynamic SQL statement is being executed, no objects are created.&lt;/p&gt;   &lt;p&gt;An example is listed below: &lt;/p&gt;   &lt;pre&gt;Sub GetOutsideData()&lt;br /&gt;&lt;br /&gt;''' Function: GetOutsideData()&lt;br /&gt;'''&lt;br /&gt;''' Comments:    This routine prompts the user for the location of the database&lt;br /&gt;‘’’  containing the data to import.  A dynamic SQL statement is constructed&lt;br /&gt;‘’’  building the connect string into the SQL statement.  The statement is&lt;br /&gt;‘’’  then executed and the data appended to a preexisting table.  It is&lt;br /&gt;‘’’  assumed the user the table and field names of the outside table is&lt;br /&gt;‘’’  constant.&lt;br /&gt;'''&lt;br /&gt;''' Arguments: none&lt;br /&gt;'''&lt;br /&gt;''' Returns:    none&lt;br /&gt;'''&lt;br /&gt;''' Called by:&lt;br /&gt;'''&lt;br /&gt;''' Keywords:   APPEND QUERY&lt;br /&gt;'''&lt;br /&gt;''' Date        Developer                               Action&lt;br /&gt;''' -------------------------------------------------------------------------&lt;br /&gt;''' 8/09/96    Marty Wasznicky                         created&lt;br /&gt;&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;   Dim varReturn As Variant, db As Database&lt;br /&gt;   Dim szdatasource As String, szSql As String, szMsg as string&lt;br /&gt;   Dim szTitle as string, szAnswer as string&lt;br /&gt;&lt;br /&gt;   szMsg = "Enter Path to database"&lt;br /&gt;   szTitle = "Run Data Demo"&lt;br /&gt;   szAnswer = InputBox$(szMsg, szTitle)&lt;br /&gt;&lt;br /&gt;   Const gcErrDiskorNetwork = 3043&lt;br /&gt;&lt;br /&gt;   If Len(szAnswer) &lt; 1 Then Exit Sub&lt;br /&gt;&lt;br /&gt;   Set db = CurrentDb()&lt;br /&gt;&lt;br /&gt;   szSql = "INSERT INTO tblTest ( PMC ) SELECT DISTINCTROW LIMS_CUST.PMC FROM _&lt;br /&gt;                 LIMS_CUST IN " &amp; Chr$(34) &amp;amp; szAnswer &amp; Chr$(34) &amp;amp; ";"&lt;br /&gt;&lt;br /&gt;   db.Execute Trim$(szSql)&lt;br /&gt;&lt;br /&gt;   ''' This traps the network error that occurs when the data file is&lt;br /&gt;   ''' located on a network drive instead of the local hard disk.&lt;br /&gt;   ''' This error only occurs in Access 7.  Also this only occurs using a Novell&lt;br /&gt;   ''' network client and the extension to your data file is ".dat"!!!!!&lt;br /&gt;&lt;br /&gt;   If Err = gcErrDiskorNetwork Then&lt;br /&gt;       MsgBox "You place data file on local hard disk"&lt;br /&gt;   End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112915533558686078?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112915533558686078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112915533558686078' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112915533558686078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112915533558686078'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/importing-data-from-and-external.html' title='Importing Data from and External Database'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112914977338130382</id><published>2005-10-12T13:41:00.000-07:00</published><updated>2005-10-12T13:43:04.113-07:00</updated><title type='text'>VBA Error Codes and messages</title><content type='html'>&lt;div class="Section1"&gt;  &lt;h3 style="text-align: center;" align="center"&gt;&lt;span style="font-family: &amp;quot;Verdana,Arial&amp;quot;;"&gt;Visual Basic Error Codes and Messages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;   &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Verdana,Arial&amp;quot;;"&gt;  &lt;hr align="center" size="2" width="100%"&gt;  &lt;/span&gt;&lt;/div&gt;  &lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3     Return without GoSub&lt;/pre&gt;&lt;pre&gt;5     Invalid procedure call&lt;/pre&gt;&lt;pre&gt;6     Overflow&lt;/pre&gt;&lt;pre&gt;7     Out of memory&lt;/pre&gt;&lt;pre&gt;9     Subscript out of range&lt;/pre&gt;&lt;pre&gt;10    This array is fixed or temporarily locked&lt;/pre&gt;&lt;pre&gt;11    Division by zero&lt;/pre&gt;&lt;pre&gt;13    Type mismatch&lt;/pre&gt;&lt;pre&gt;14    Out of string space&lt;/pre&gt;&lt;pre&gt;16    Expression Too Complex&lt;/pre&gt;&lt;pre&gt;17    Can't perform requested operation&lt;/pre&gt;&lt;pre&gt;18    User interrupt occurred&lt;/pre&gt;&lt;pre&gt;20    Resume without error&lt;/pre&gt;&lt;pre&gt;28    Out of stack space&lt;/pre&gt;&lt;pre&gt;35    Sub, Function, or Property not defined&lt;/pre&gt;&lt;pre&gt;47    Too many DLL application clients&lt;/pre&gt;&lt;pre&gt;48    Error in loading DLL&lt;/pre&gt;&lt;pre&gt;49    Bad DLL calling convention&lt;/pre&gt;&lt;pre&gt;51    Internal error&lt;/pre&gt;&lt;pre&gt;52    Bad file name or number&lt;/pre&gt;&lt;pre&gt;53    File not found&lt;/pre&gt;&lt;pre&gt;54    Bad file mode&lt;/pre&gt;&lt;pre&gt;55    File already open&lt;/pre&gt;&lt;pre&gt;57    Device I/O error&lt;/pre&gt;&lt;pre&gt;58    File already exists&lt;/pre&gt;&lt;pre&gt;59    Bad record length&lt;/pre&gt;&lt;pre&gt;61    Disk full&lt;/pre&gt;&lt;pre&gt;62    Input past end of file&lt;/pre&gt;&lt;pre&gt;63    Bad record number&lt;/pre&gt;&lt;pre&gt;67    Too many files&lt;/pre&gt;&lt;pre&gt;68    Device unavailable&lt;/pre&gt;&lt;pre&gt;70    Permission denied&lt;/pre&gt;&lt;pre&gt;71    Disk not ready&lt;/pre&gt;&lt;pre&gt;74    Can't rename with different drive&lt;/pre&gt;&lt;pre&gt;75    Path/File access error&lt;/pre&gt;&lt;pre&gt;76    Path not found&lt;/pre&gt;&lt;pre&gt;91    Object variable or With block variable not set&lt;/pre&gt;&lt;pre&gt;92    For loop not initialized&lt;/pre&gt;&lt;pre&gt;93    Invalid pattern string&lt;/pre&gt;&lt;pre&gt;94    Invalid use of Null&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;260   No timer available&lt;/pre&gt;&lt;pre&gt;280   DDE channel not fully closed; awaiting response from foreign application&lt;/pre&gt;&lt;pre&gt;281   No More DDE channels&lt;/pre&gt;&lt;pre&gt;282   No foreign application responded to a DDE initiate&lt;/pre&gt;&lt;pre&gt;283   Multiple applications responded to a DDE initiate&lt;/pre&gt;&lt;pre&gt;284   DDE channel locked&lt;/pre&gt;&lt;pre&gt;285   Foreign application won't perform DDE method or operation&lt;/pre&gt;&lt;pre&gt;286   Timeout while waiting for DDE response&lt;/pre&gt;&lt;pre&gt;287   User pressed Escape key during DDE operation&lt;/pre&gt;&lt;pre&gt;288   Destination is busy&lt;/pre&gt;&lt;pre&gt;289   Data not provided in DDE operation&lt;/pre&gt;&lt;pre&gt;290   Data in wrong format&lt;/pre&gt;&lt;pre&gt;291   Foreign application quit&lt;/pre&gt;&lt;pre&gt;292   DDE conversation closed or changed&lt;/pre&gt;&lt;pre&gt;293   DDE method invoked with no channel open&lt;/pre&gt;&lt;pre&gt;294   Invalid DDE Link format&lt;/pre&gt;&lt;pre&gt;295   Message queue filled; DDE message lost&lt;/pre&gt;&lt;pre&gt;296   PasteLink already performed on this control&lt;/pre&gt;&lt;pre&gt;297   Cant set LinkMode; invalid Link Topic&lt;/pre&gt;&lt;pre&gt;298   System DLL 'dll'' could not be loaded (Error 298)&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;320   Can't use character device names in file names: 'item'&lt;/pre&gt;&lt;pre&gt;321   Invalid file format&lt;/pre&gt;&lt;pre&gt;325   Invalid format in resource file&lt;/pre&gt;&lt;pre&gt;326   Resource with identifier item not found&lt;/pre&gt;&lt;pre&gt;335   Could not access system registry&lt;/pre&gt;&lt;pre&gt;336   Object server not correctly registered&lt;/pre&gt;&lt;pre&gt;337   Object server not found&lt;/pre&gt;&lt;pre&gt;338   Object server did not correctly run&lt;/pre&gt;&lt;pre&gt;340   Control array element item doesn't exist&lt;/pre&gt;&lt;pre&gt;341   Invalid control array index&lt;/pre&gt;&lt;pre&gt;342   Not enough room to allocate control array 'item'&lt;/pre&gt;&lt;pre&gt;343   Object not an array&lt;/pre&gt;&lt;pre&gt;344   Must specify index for object array&lt;/pre&gt;&lt;pre&gt;345   Reached limit: cannot create any more controls for this form&lt;/pre&gt;&lt;pre&gt;360   Object already loaded&lt;/pre&gt;&lt;pre&gt;361   Can't load or unload this object&lt;/pre&gt;&lt;pre&gt;362   Can't unload controls created at design time&lt;/pre&gt;&lt;pre&gt;363   Custom control 'item' not found&lt;/pre&gt;&lt;pre&gt;364   Object was unloaded&lt;/pre&gt;&lt;pre&gt;365   Unable to unload within this context&lt;/pre&gt;&lt;pre&gt;366   No MDI form available to load&lt;/pre&gt;&lt;pre&gt;380   Invalid property value&lt;/pre&gt;&lt;pre&gt;381   Invalid property array index&lt;/pre&gt;&lt;pre&gt;382   'Item' property cannot be set at run time&lt;/pre&gt;&lt;pre&gt;383   'Item' property is read-only&lt;/pre&gt;&lt;pre&gt;384   A form cant be moved or sized while minimized or maximized&lt;/pre&gt;&lt;pre&gt;385   Must specify index when using property array&lt;/pre&gt;&lt;pre&gt;386   'Item' property not available at run time&lt;/pre&gt;&lt;pre&gt;387   'Item' property can't be set on this control&lt;/pre&gt;&lt;pre&gt;388   Can't set Visible property from a parent menu&lt;/pre&gt;&lt;pre&gt;389   Invalid key&lt;/pre&gt;&lt;pre&gt;390   No Defined Value&lt;/pre&gt;&lt;pre&gt;391   Name not available&lt;/pre&gt;&lt;pre&gt;393   'Item' property cannot be read at run time&lt;/pre&gt;&lt;pre&gt;394   'Item' property is write-only&lt;/pre&gt;&lt;pre&gt;395   Cant use separator bar as menu name&lt;/pre&gt;&lt;pre&gt;396   'Item' property cannot be set within a page&lt;/pre&gt;&lt;pre&gt;397   Cant set Visible property for top level menus while they are merged&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;400   Form already displayed; can't show modally&lt;/pre&gt;&lt;pre&gt;401   Can't show non-modal form when modal form is displayed&lt;/pre&gt;&lt;pre&gt;402   Must close or hide topmost modal form first&lt;/pre&gt;&lt;pre&gt;403   MDI forms cannot be shown modally&lt;/pre&gt;&lt;pre&gt;404   MDI child forms cannot be shown modally&lt;/pre&gt;&lt;pre&gt;419   Permission to use object denied&lt;/pre&gt;&lt;pre&gt;423   Property or method not found&lt;/pre&gt;&lt;pre&gt;424   Object required&lt;/pre&gt;&lt;pre&gt;426   Only one MDI Form allowed&lt;/pre&gt;&lt;pre&gt;427   Invalid object type; Menu control required&lt;/pre&gt;&lt;pre&gt;428   Popup menu must have at least one submenu&lt;/pre&gt;&lt;pre&gt;429   OLE Automation server cannot create object&lt;/pre&gt;&lt;pre&gt;430   Class doesnt support OLE Automation&lt;/pre&gt;&lt;pre&gt;432   File name or class name not found during OLE Automation operation&lt;/pre&gt;&lt;pre&gt;438   Object doesn't support this property or method&lt;/pre&gt;&lt;pre&gt;440   OLE Automation error&lt;/pre&gt;&lt;pre&gt;443   OLE Automation object does not have a default value&lt;/pre&gt;&lt;pre&gt;445   Object doesn't support this action&lt;/pre&gt;&lt;pre&gt;446   Object doesn't support named arguments&lt;/pre&gt;&lt;pre&gt;447   Object doesn't support current locale setting&lt;/pre&gt;&lt;pre&gt;448   Named argument not found&lt;/pre&gt;&lt;pre&gt;449   Argument not optional&lt;/pre&gt;&lt;pre&gt;450   Wrong number of arguments&lt;/pre&gt;&lt;pre&gt;451   Object not a collection&lt;/pre&gt;&lt;pre&gt;452   Invalid ordinal&lt;/pre&gt;&lt;pre&gt;453   Specified DLL function not found&lt;/pre&gt;&lt;pre&gt;456   Get and Put cannot be used with arrays in Variants&lt;/pre&gt;&lt;pre&gt;457   This key is already associated with an element of this collection&lt;/pre&gt;&lt;pre&gt;460   Invalid Clipboard format&lt;/pre&gt;&lt;pre&gt;461   Specified format doesnt match format of data&lt;/pre&gt;&lt;pre&gt;480   Can't create AutoRedraw image&lt;/pre&gt;&lt;pre&gt;481   Invalid picture&lt;/pre&gt;&lt;pre&gt;482   Printer error&lt;/pre&gt;&lt;pre&gt;483   Printer driver does not support specified property&lt;/pre&gt;&lt;pre&gt;484   Problem getting printer information from the system. Make sure the printer is set up correctly&lt;/pre&gt;&lt;pre&gt;485   Invalid picture type&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;520   Cant empty Clipboard&lt;/pre&gt;&lt;pre&gt;521   Cant open Clipboard&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;2055  Expression not valid: &lt;expression&gt;.&lt;/expression&gt;&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;2390  Can't change the data type or field size of this field.  It is part of one or more relationships.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;2420  Syntax error in number.&lt;/pre&gt;&lt;pre&gt;2421  Syntax error in date.&lt;/pre&gt;&lt;pre&gt;2422  Syntax error in string.&lt;/pre&gt;&lt;pre&gt;2423  Invalid use of '.', '!', or '()'.&lt;/pre&gt;&lt;pre&gt;2424  Unknown name.&lt;/pre&gt;&lt;pre&gt;2425  Unknown function name.&lt;/pre&gt;&lt;pre&gt;2426  Function isn't available in expressions.&lt;/pre&gt;&lt;pre&gt;2427  Object has no value.&lt;/pre&gt;&lt;pre&gt;2428  Invalid arguments used with domain function&lt;/pre&gt;&lt;pre&gt;2429  In operator without ()&lt;/pre&gt;&lt;pre&gt;2430  Between operator without And&lt;/pre&gt;&lt;pre&gt;2431  Syntax error (missing operator).&lt;/pre&gt;&lt;pre&gt;2432  Syntax error (comma).&lt;/pre&gt;&lt;pre&gt;2433  Syntax error.&lt;/pre&gt;&lt;pre&gt;2434  Syntax error (missing operator).&lt;/pre&gt;&lt;pre&gt;2435  Extra ).&lt;/pre&gt;&lt;pre&gt;2436  Missing ), ], or Item.&lt;/pre&gt;&lt;pre&gt;2437  Invalid use of vertical bars.&lt;/pre&gt;&lt;pre&gt;2438  Syntax error.&lt;/pre&gt;&lt;pre&gt;2439  Wrong number of arguments used with function.&lt;/pre&gt;&lt;pre&gt;2442  Invalid use of parentheses.&lt;/pre&gt;&lt;pre&gt;2443  Invalid use of Is operator.&lt;/pre&gt;&lt;pre&gt;2445  Expression too complex.&lt;/pre&gt;&lt;pre&gt;2446  Out of memory during calculation.&lt;/pre&gt;&lt;pre&gt;2447  Invalid use of '.', '!', or '()'.&lt;/pre&gt;&lt;pre&gt;2448  Can't set value.&lt;/pre&gt;&lt;pre&gt;2449  Invalid method in expression.&lt;/pre&gt;&lt;pre&gt;2450  Invalid reference to form 'Item'.&lt;/pre&gt;&lt;pre&gt;2451  Invalid reference to report 'Item'.&lt;/pre&gt;&lt;pre&gt;2452  Invalid reference to Parent property.&lt;/pre&gt;&lt;pre&gt;2453  Invalid reference to control 'Item'.&lt;/pre&gt;&lt;pre&gt;2454  Invalid reference to '!Item'.&lt;/pre&gt;&lt;pre&gt;2455  Invalid reference to property 'Item'.&lt;/pre&gt;&lt;pre&gt;2456  Invalid form number reference.&lt;/pre&gt;&lt;pre&gt;2457  Invalid report number reference.&lt;/pre&gt;&lt;pre&gt;2458  Invalid control number reference.&lt;/pre&gt;&lt;pre&gt;2459  Can't refer to Parent property in Design view.&lt;/pre&gt;&lt;pre&gt;2460  Can't refer to Dynaset property in Design view.&lt;/pre&gt;&lt;pre&gt;2461  Invalid section reference.&lt;/pre&gt;&lt;pre&gt;2462  Invalid section number reference.&lt;/pre&gt;&lt;pre&gt;2463  Invalid group level reference.&lt;/pre&gt;&lt;pre&gt;2464  Invalid group level number reference.&lt;/pre&gt;&lt;pre&gt;2465  Invalid reference to field 'Item'.&lt;/pre&gt;&lt;pre&gt;2466  Invalid reference to Dynaset property.&lt;/pre&gt;&lt;pre&gt;2467  Object referred to in expression no longer exists.&lt;/pre&gt;&lt;pre&gt;2468  Invalid argument used with DatePart, DateAdd or DateDiff function.&lt;/pre&gt;&lt;pre&gt;2469  Item1 in validation rule: 'Item2'.&lt;/pre&gt;&lt;pre&gt;2470  Item in validation rule.&lt;/pre&gt;&lt;pre&gt;2471  Item in query.&lt;/pre&gt;&lt;pre&gt;2472  Item in linked master field.&lt;/pre&gt;&lt;pre&gt;2473  Item1 in 'Item2' expression.&lt;/pre&gt;&lt;pre&gt;2474  No control is active.&lt;/pre&gt;&lt;pre&gt;2475  No form is active.&lt;/pre&gt;&lt;pre&gt;2476  No report is active.&lt;/pre&gt;&lt;pre&gt;2477  Invalid subclass 'Item' referred to in TypeOf function.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3000  Reserved error (Item); there is no message for this error.&lt;/pre&gt;&lt;pre&gt;3001  Invalid argument.&lt;/pre&gt;&lt;pre&gt;3002  Couldn't start session.&lt;/pre&gt;&lt;pre&gt;3003  Couldn't start transaction; too many transactions already nested.&lt;/pre&gt;&lt;pre&gt;3004  Couldn't find database 'Item'.&lt;/pre&gt;&lt;pre&gt;3005  'Item' isn't a valid database name.&lt;/pre&gt;&lt;pre&gt;3006  Database 'Item' is exclusively locked.&lt;/pre&gt;&lt;pre&gt;3007  Couldn't open database 'Item'.&lt;/pre&gt;&lt;pre&gt;3008  Table 'Item' is exclusively locked.&lt;/pre&gt;&lt;pre&gt;3009  Couldn't lock table 'Item'; currently in use.&lt;/pre&gt;&lt;pre&gt;3010  Table 'Item' already exists.&lt;/pre&gt;&lt;pre&gt;3011  Couldn't find object 'Item'.&lt;/pre&gt;&lt;pre&gt;3012  Object 'Item' already exists.&lt;/pre&gt;&lt;pre&gt;3013  Couldn't rename installable ISAM file.&lt;/pre&gt;&lt;pre&gt;3014  Can't open any more tables.&lt;/pre&gt;&lt;pre&gt;3015  Item' isn't an index in this table.&lt;/pre&gt;&lt;pre&gt;3016  Field won't fit in record.&lt;/pre&gt;&lt;pre&gt;3017  Field length is too long.&lt;/pre&gt;&lt;pre&gt;3018  Couldn't find field 'Item'.&lt;/pre&gt;&lt;pre&gt;3019  Operation invalid without a current index.&lt;/pre&gt;&lt;pre&gt;3020  Update without AddNew or Edit.&lt;/pre&gt;&lt;pre&gt;3021  No current record.&lt;/pre&gt;&lt;pre&gt;3022  Can't have duplicate key; index changes were unsuccessful.&lt;/pre&gt;&lt;pre&gt;3023  AddNew or Edit already used.&lt;/pre&gt;&lt;pre&gt;3024  Couldn't find file 'Item'.&lt;/pre&gt;&lt;pre&gt;3025  Can't open any more files.&lt;/pre&gt;&lt;pre&gt;3026  Not enough space on disk.&lt;/pre&gt;&lt;pre&gt;3027  Couldn't update; database is read-only.&lt;/pre&gt;&lt;pre&gt;3028  Couldn't initialize data access because file 'SYSTEM.MDW' couldn't be opened.&lt;/pre&gt;&lt;pre&gt;3029  Not a valid account name or password.&lt;/pre&gt;&lt;pre&gt;3030  'Item' isn't a valid account name.&lt;/pre&gt;&lt;pre&gt;3031  Not a valid password.&lt;/pre&gt;&lt;pre&gt;3032  Can't perform this operation.&lt;/pre&gt;&lt;pre&gt;3033  No permission for 'Item'.&lt;/pre&gt;&lt;pre&gt;3034  Commit or Rollback without BeginTrans.&lt;/pre&gt;&lt;pre&gt;3036  Database has reached maximum size.&lt;/pre&gt;&lt;pre&gt;3037  Can't open any more tables or queries.&lt;/pre&gt;&lt;pre&gt;3039  Couldn't create index; too many indexes already defined.&lt;/pre&gt;&lt;pre&gt;3040  Disk I/O error during read.&lt;/pre&gt;&lt;pre&gt;3041  Incompatible database version.&lt;/pre&gt;&lt;pre&gt;3042  Out of MS-DOS file handles.&lt;/pre&gt;&lt;pre&gt;3043  Disk or network error.&lt;/pre&gt;&lt;pre&gt;3044  'Item' isn't a valid path.&lt;/pre&gt;&lt;pre&gt;3045  Couldn't use 'Item'; file already in use.&lt;/pre&gt;&lt;pre&gt;3046  Couldn't save; currently locked by another user.&lt;/pre&gt;&lt;pre&gt;3047  Record is too large.&lt;/pre&gt;&lt;pre&gt;3048  Can't open any more databases.&lt;/pre&gt;&lt;pre&gt;3049  Can't open database &lt;name&gt;. File is corrupt or not a Microsoft Jet database.&lt;/name&gt;&lt;/pre&gt;&lt;pre&gt;3050  Couldn't lock file; SHARE.EXE hasn't been loaded.&lt;/pre&gt;&lt;pre&gt;3051  Couldn't open file 'Item'.&lt;/pre&gt;&lt;pre&gt;3052  MS-DOS file sharing lock count exceeded.  You need to increase the number of locks installed with SHARE.EXE.&lt;/pre&gt;&lt;pre&gt;3053  Too many client tasks.&lt;/pre&gt;&lt;pre&gt;3054  Too many Memo or Long Binary fields.&lt;/pre&gt;&lt;pre&gt;3055  Not a valid file name.&lt;/pre&gt;&lt;pre&gt;3056  Couldn't repair this database.&lt;/pre&gt;&lt;pre&gt;3057  Operation not supported on attached tables.&lt;/pre&gt;&lt;pre&gt;3058  Can't have Null value in index.&lt;/pre&gt;&lt;pre&gt;3059  Operation canceled by user.&lt;/pre&gt;&lt;pre&gt;3060  Wrong data type for parameter 'Item'.&lt;/pre&gt;&lt;pre&gt;3061  Item1 parameters were expected, but only Item2 were supplied.&lt;/pre&gt;&lt;pre&gt;3062  Duplicate output alias 'Item'.&lt;/pre&gt;&lt;pre&gt;3063  Duplicate output destination 'Item'.&lt;/pre&gt;&lt;pre&gt;3064  Can't open action query 'Item'.&lt;/pre&gt;&lt;pre&gt;3065  Can't execute a non-action query.&lt;/pre&gt;&lt;pre&gt;3066  Query must have at least one output field.&lt;/pre&gt;&lt;pre&gt;3067  Query input must contain at least one table or query.&lt;/pre&gt;&lt;pre&gt;3068  Not a valid alias name.&lt;/pre&gt;&lt;pre&gt;3069  Can't have action query 'Item' as an input.&lt;/pre&gt;&lt;pre&gt;3070  Can't bind name 'Item'.&lt;/pre&gt;&lt;pre&gt;3071  Can't evaluate expression.&lt;/pre&gt;&lt;pre&gt;3073  Operation must use an updatable query.&lt;/pre&gt;&lt;pre&gt;3074  Can't repeat table name 'Item' in FROM clause.&lt;/pre&gt;&lt;pre&gt;3075  Item1 in query expression 'Item2'.&lt;/pre&gt;&lt;pre&gt;3076  Item in criteria expression.&lt;/pre&gt;&lt;pre&gt;3077  Item in expression.&lt;/pre&gt;&lt;pre&gt;3078  Couldn't find input table or query 'Item'.&lt;/pre&gt;&lt;pre&gt;3079  Ambiguous field reference 'Item'.&lt;/pre&gt;&lt;pre&gt;3080  Joined table 'Item' not listed in FROM clause.&lt;/pre&gt;&lt;pre&gt;3081  Can't join more than one table with the same name (Item).&lt;/pre&gt;&lt;pre&gt;3082  JOIN operation 'Item' refers to a non-joined table.&lt;/pre&gt;&lt;pre&gt;3083  Can't use internal report query.&lt;/pre&gt;&lt;pre&gt;3084  Can't insert into action query.&lt;/pre&gt;&lt;pre&gt;3085  Undefined function 'Item' in expression.&lt;/pre&gt;&lt;pre&gt;3086  Couldn't delete from specified tables.&lt;/pre&gt;&lt;pre&gt;3087  Too many expressions in GROUP BY clause.&lt;/pre&gt;&lt;pre&gt;3088  Too many expressions in ORDER BY clause.&lt;/pre&gt;&lt;pre&gt;3089  Too many expressions in DISTINCT output.&lt;/pre&gt;&lt;pre&gt;3090  Resultant table may not have more than one Counter field.&lt;/pre&gt;&lt;pre&gt;3091  HAVING clause (Item) without grouping or aggregation.&lt;/pre&gt;&lt;pre&gt;3092  Can't use HAVING clause in TRANSFORM statement.&lt;/pre&gt;&lt;pre&gt;3093  ORDER BY clause (Item) conflicts with DISTINCT.&lt;/pre&gt;&lt;pre&gt;3094  ORDER BY clause (Item) conflicts with GROUP BY clause.&lt;/pre&gt;&lt;pre&gt;3095  Can't have aggregate function in expression (Item).&lt;/pre&gt;&lt;pre&gt;3096  Can't have aggregate function in WHERE clause (Item).&lt;/pre&gt;&lt;pre&gt;3097  Can't have aggregate function in ORDER BY clause (Item).&lt;/pre&gt;&lt;pre&gt;3098  Can't have aggregate function in GROUP BY clause (Item).&lt;/pre&gt;&lt;pre&gt;3099  Can't have aggregate function in JOIN operation (Item).&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3100  Can't set field 'Item' in join key to Null.&lt;/pre&gt;&lt;pre&gt;3101  Join is broken by value(s) in fields 'Item'.&lt;/pre&gt;&lt;pre&gt;3102  Circular reference caused by 'Item'.&lt;/pre&gt;&lt;pre&gt;3103  Circular reference caused by alias 'Item' in query definition's SELECT list.&lt;/pre&gt;&lt;pre&gt;3104  Can't specify Fixed Column Heading 'Item' in a crosstab query more than once.&lt;/pre&gt;&lt;pre&gt;3105  Missing destination field name in SELECT INTO statement (Item).&lt;/pre&gt;&lt;pre&gt;3106  Missing destination field name in UPDATE statement (Item).&lt;/pre&gt;&lt;pre&gt;3107  Couldn't insert; no insert permission for table or query 'Item'.&lt;/pre&gt;&lt;pre&gt;3108  Record(s) can't be edited; no Update Data permission on &lt;name&gt;.&lt;/name&gt;&lt;/pre&gt;&lt;pre&gt;3109  Couldn't delete; no delete permission for table or query 'Item'.&lt;/pre&gt;&lt;pre&gt;3110  Couldn't read definitions; no read definitions permission for table or query 'Item'.&lt;/pre&gt;&lt;pre&gt;3111  Couldn't create; no create permission for table or query 'Item'.&lt;/pre&gt;&lt;pre&gt;3112  Couldn't read; no read permission for table or query 'Item'.&lt;/pre&gt;&lt;pre&gt;3113  Can't update 'Item'; field not updatable.&lt;/pre&gt;&lt;pre&gt;3114  Can't include Memo or Long Binary when you select unique values (Item).&lt;/pre&gt;&lt;pre&gt;3115  Can't have Memo or Long Binary in aggregate argument (Item).&lt;/pre&gt;&lt;pre&gt;3116  Can't have Memo or Long Binary in criteria (Item) for aggregate function.&lt;/pre&gt;&lt;pre&gt;3117  Can't sort on Memo or Long Binary (Item).&lt;/pre&gt;&lt;pre&gt;3118  Can't join on Memo or Long Binary (Item).&lt;/pre&gt;&lt;pre&gt;3119  Can't group on Memo or Long Binary (Item).&lt;/pre&gt;&lt;pre&gt;3120  Can't group on fields selected with '*' (Item).&lt;/pre&gt;&lt;pre&gt;3121  Can't group on fields selected with '*'.&lt;/pre&gt;&lt;pre&gt;3122  'Item' not part of aggregate function or grouping.&lt;/pre&gt;&lt;pre&gt;3123  Can't use '*' in crosstab query.&lt;/pre&gt;&lt;pre&gt;3124  Can't input from internal report query (Item).&lt;/pre&gt;&lt;pre&gt;3125  'Item' isn't a valid name.&lt;/pre&gt;&lt;pre&gt;3126  Invalid bracketing of name 'Item'.&lt;/pre&gt;&lt;pre&gt;3127  INSERT INTO statement contains unknown field name 'Item'.&lt;/pre&gt;&lt;pre&gt;3128  Must specify tables to delete from.&lt;/pre&gt;&lt;pre&gt;3129  Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.&lt;/pre&gt;&lt;pre&gt;3130  Syntax error in DELETE statement.&lt;/pre&gt;&lt;pre&gt;3131  Syntax error in FROM clause.&lt;/pre&gt;&lt;pre&gt;3132  Syntax error in GROUP BY clause.&lt;/pre&gt;&lt;pre&gt;3133  Syntax error in HAVING clause.&lt;/pre&gt;&lt;pre&gt;3134  Syntax error in INSERT statement.&lt;/pre&gt;&lt;pre&gt;3135  Syntax error in JOIN operation.&lt;/pre&gt;&lt;pre&gt;3136  Syntax error in LEVEL clause.&lt;/pre&gt;&lt;pre&gt;3137  Missing semicolon (;) at end of SQL statement.&lt;/pre&gt;&lt;pre&gt;3138  Syntax error in ORDER BY clause.&lt;/pre&gt;&lt;pre&gt;3139  Syntax error in PARAMETER clause.&lt;/pre&gt;&lt;pre&gt;3140  Syntax error in PROCEDURE clause.&lt;/pre&gt;&lt;pre&gt;3141  Syntax error in SELECT statement.&lt;/pre&gt;&lt;pre&gt;3142  Characters found after end of SQL statement.&lt;/pre&gt;&lt;pre&gt;3143  Syntax error in TRANSFORM statement.&lt;/pre&gt;&lt;pre&gt;3144  Syntax error in UPDATE statement.&lt;/pre&gt;&lt;pre&gt;3145  Syntax error in WHERE clause.&lt;/pre&gt;&lt;pre&gt;3146  ODBCcall failed.&lt;/pre&gt;&lt;pre&gt;3147  ODBCdata buffer overflow.&lt;/pre&gt;&lt;pre&gt;3148  ODBCconnection failed.&lt;/pre&gt;&lt;pre&gt;3149  ODBCincorrect DLL.&lt;/pre&gt;&lt;pre&gt;3150  ODBCmissing DLL.&lt;/pre&gt;&lt;pre&gt;3151  ODBCconnection to 'Item' failed.&lt;/pre&gt;&lt;pre&gt;3152  ODBCincorrect driver version 'Item1'; expected version 'Item2'.&lt;/pre&gt;&lt;pre&gt;3153  ODBCincorrect server version 'Item1'; expected version 'Item2'.&lt;/pre&gt;&lt;pre&gt;3154  ODBCcouldn't find DLL 'Item'.&lt;/pre&gt;&lt;pre&gt;3155  ODBCinsert failed.&lt;/pre&gt;&lt;pre&gt;3156  ODBCdelete failed.&lt;/pre&gt;&lt;pre&gt;3157  ODBCupdate failed.&lt;/pre&gt;&lt;pre&gt;3158  Couldn't save record; currently locked by another user.&lt;/pre&gt;&lt;pre&gt;3159  Not a valid bookmark.&lt;/pre&gt;&lt;pre&gt;3160  Table isn't open.&lt;/pre&gt;&lt;pre&gt;3161  Couldn't decrypt file.&lt;/pre&gt;&lt;pre&gt;3162  Null is invalid.&lt;/pre&gt;&lt;pre&gt;3163  Couldn't insert or paste; data too long for field.&lt;/pre&gt;&lt;pre&gt;3164  Couldn't update field.&lt;/pre&gt;&lt;pre&gt;3165  Couldn't open .INF file.&lt;/pre&gt;&lt;pre&gt;3166  Missing memo file.&lt;/pre&gt;&lt;pre&gt;3167  Record is deleted.&lt;/pre&gt;&lt;pre&gt;3168  Invalid .INF file.&lt;/pre&gt;&lt;pre&gt;3169  Illegal type in expression.&lt;/pre&gt;&lt;pre&gt;3170  Couldn't find installable ISAM.&lt;/pre&gt;&lt;pre&gt;3171  Couldn't find net path or user name.&lt;/pre&gt;&lt;pre&gt;3172  Couldn't open PARADOX.NET.&lt;/pre&gt;&lt;pre&gt;3173  Couldn't open table 'MSysAccounts' in SYSTEM.MDW.&lt;/pre&gt;&lt;pre&gt;3174  Couldn't open table 'MSysGroups' in SYSTEM.MDW.&lt;/pre&gt;&lt;pre&gt;3175  Date is out of range or is in an invalid format.&lt;/pre&gt;&lt;pre&gt;3176  Couldn't open file 'Item'.&lt;/pre&gt;&lt;pre&gt;3177  Not a valid table name.&lt;/pre&gt;&lt;pre&gt;3178  Out of memory.&lt;/pre&gt;&lt;pre&gt;3179  Encountered unexpected end of file.&lt;/pre&gt;&lt;pre&gt;3180  Couldn't write to file 'Item'.&lt;/pre&gt;&lt;pre&gt;3181  Invalid range.&lt;/pre&gt;&lt;pre&gt;3182  Invalid file format.&lt;/pre&gt;&lt;pre&gt;3183  Not enough space on temporary disk.&lt;/pre&gt;&lt;pre&gt;3184  Couldn't execute query; couldn't find linked table.&lt;/pre&gt;&lt;pre&gt;3185  SELECT INTO remote database tried to produce too many fields.&lt;/pre&gt;&lt;pre&gt;3186  Couldn't save; currently locked by user 'Item2' on machine 'Item1'.&lt;/pre&gt;&lt;pre&gt;3187  Couldn't read; currently locked by user 'Item2' on machine 'Item1'.&lt;/pre&gt;&lt;pre&gt;3188  Couldn't update; currently locked by another session on this machine.&lt;/pre&gt;&lt;pre&gt;3189  Table 'Item1' is exclusively locked by user 'Item3' on machine 'Item2'.&lt;/pre&gt;&lt;pre&gt;3190  Too many fields defined.&lt;/pre&gt;&lt;pre&gt;3191  Can't define field more than once.&lt;/pre&gt;&lt;pre&gt;3192  Couldn't find output table 'Item'.&lt;/pre&gt;&lt;pre&gt;3193  No UserName.&lt;/pre&gt;&lt;pre&gt;3194  No machine name.&lt;/pre&gt;&lt;pre&gt;3196  Couldn't use 'Item'; database already in use.&lt;/pre&gt;&lt;pre&gt;3197  Data has changed; operation stopped.&lt;/pre&gt;&lt;pre&gt;3198  Couldn't start session.  Too many sessions already active.&lt;/pre&gt;&lt;pre&gt;3199  Couldn't find reference.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3200  Can't delete or change record. Related records exist in table 'Item' that would violate referential integrity.&lt;/pre&gt;&lt;pre&gt;3201  Can't add or change record.  Referential integrity rules require a related record in table 'Item'.&lt;/pre&gt;&lt;pre&gt;3202  Couldn't save; currently locked by user 'Item2' on machine 'Item1'.&lt;/pre&gt;&lt;pre&gt;3203  Can't specify subquery in expression (Item).&lt;/pre&gt;&lt;pre&gt;3204  Database already exists.&lt;/pre&gt;&lt;pre&gt;3205  Too many crosstab column headers (Item).&lt;/pre&gt;&lt;pre&gt;3206  Can't create a relationship between a field and itself.&lt;/pre&gt;&lt;pre&gt;3207  Operation not supported on Paradox table with no primary key.&lt;/pre&gt;&lt;pre&gt;3208  Invalid Deleted entry in [dBASE ISAM] section in INI file.&lt;/pre&gt;&lt;pre&gt;3209  Invalid Stats entry in [dBASE ISAM] section in INI file.&lt;/pre&gt;&lt;pre&gt;3210  Connect string too long.&lt;/pre&gt;&lt;pre&gt;3211  Couldn't lock table 'Item'; currently in use.&lt;/pre&gt;&lt;pre&gt;3212  Couldn't lock table 'Item1'; currently in use by user 'Item3' on machine 'Item2'.&lt;/pre&gt;&lt;pre&gt;3213  Invalid Date entry in [dBASE ISAM] section in INI file.&lt;/pre&gt;&lt;pre&gt;3214  Invalid Mark entry in [dBASE ISAM] section in INI file.&lt;/pre&gt;&lt;pre&gt;3215  Too many Btrieve tasks.&lt;/pre&gt;&lt;pre&gt;3216  Parameter 'Item' specified where a table name is required.&lt;/pre&gt;&lt;pre&gt;3217  Parameter 'Item' specified where a database name is required.&lt;/pre&gt;&lt;pre&gt;3218  Couldn't update; currently locked.&lt;/pre&gt;&lt;pre&gt;3219  Invalid Operation.&lt;/pre&gt;&lt;pre&gt;3220  Wrong Paradox sort sequence.&lt;/pre&gt;&lt;pre&gt;3221  Invalid entries in [Btrieve ISAM] section in WIN.INI.&lt;/pre&gt;&lt;pre&gt;3222  Query can't contain a Database parameter.&lt;/pre&gt;&lt;pre&gt;3223  'Item' isn't a valid parameter name.&lt;/pre&gt;&lt;pre&gt;3224  Btrievedata dictionary is corrupted.&lt;/pre&gt;&lt;pre&gt;3225  Encountered record locking deadlock while performing Btrieve operation.&lt;/pre&gt;&lt;pre&gt;3226  Errors encountered while using the Btrieve DLL.&lt;/pre&gt;&lt;pre&gt;3227  Invalid Century entry in [dBASE ISAM] section in INI file.&lt;/pre&gt;&lt;pre&gt;3228  Invalid CollatingSequence entry in [Paradox ISAM] section in INI file.&lt;/pre&gt;&lt;pre&gt;3229  Btrievecan't change field.&lt;/pre&gt;&lt;pre&gt;3230  Out-of-date Paradox lock file.&lt;/pre&gt;&lt;pre&gt;3231  ODBCfield would be too long; data truncated.&lt;/pre&gt;&lt;pre&gt;3232  ODBCcouldn't create table.&lt;/pre&gt;&lt;pre&gt;3233  ODBCincorrect driver version.&lt;/pre&gt;&lt;pre&gt;3234  ODBCremote query timeout expired.&lt;/pre&gt;&lt;pre&gt;3235  ODBCdata type not supported on server.&lt;/pre&gt;&lt;pre&gt;3236  ODBCencountered unexpected Null value.&lt;/pre&gt;&lt;pre&gt;3237  ODBCunexpected type.&lt;/pre&gt;&lt;pre&gt;3238  ODBCdata out of range.&lt;/pre&gt;&lt;pre&gt;3239  Too many active users.&lt;/pre&gt;&lt;pre&gt;3240  Btrievemissing WBTRCALL.DLL.&lt;/pre&gt;&lt;pre&gt;3241  Btrieveout of resources.&lt;/pre&gt;&lt;pre&gt;3242  Invalid reference in SELECT statement.&lt;/pre&gt;&lt;pre&gt;3243  None of the import field names match fields in the appended table.&lt;/pre&gt;&lt;pre&gt;3244  Can't import password-protected spreadsheet.&lt;/pre&gt;&lt;pre&gt;3245  Couldn't parse field names from first row of import table.&lt;/pre&gt;&lt;pre&gt;3246  Operation not supported in transactions.&lt;/pre&gt;&lt;pre&gt;3247  ODBClinked table definition has changed.&lt;/pre&gt;&lt;pre&gt;3248  Invalid NetworkAccess entry in INI file.&lt;/pre&gt;&lt;pre&gt;3249  Invalid PageTimeout entry in INI file.&lt;/pre&gt;&lt;pre&gt;3250  Couldn't build key.&lt;/pre&gt;&lt;pre&gt;3251  Feature not available.&lt;/pre&gt;&lt;pre&gt;3252  Illegal reentrancy during query execution.&lt;/pre&gt;&lt;pre&gt;3254  ODBCCan't lock all records.&lt;/pre&gt;&lt;pre&gt;3255  ODBCCan't change connect string parameter.&lt;/pre&gt;&lt;pre&gt;3256  Index file not found.&lt;/pre&gt;&lt;pre&gt;3257  Syntax error in WITH OWNERACCESS OPTION declaration.&lt;/pre&gt;&lt;pre&gt;3258  Query contains ambiguous (outer) joins.&lt;/pre&gt;&lt;pre&gt;3259  Invalid field data type.&lt;/pre&gt;&lt;pre&gt;3260  Couldn't update; currently locked by user 'Item2' on machine 'Item1'.&lt;/pre&gt;&lt;pre&gt;3261  Item&lt;/pre&gt;&lt;pre&gt;3262  Table in use.&lt;/pre&gt;&lt;pre&gt;3263  Invalid database object.&lt;/pre&gt;&lt;pre&gt;3264  No fields defined - cannot append table&lt;/pre&gt;&lt;pre&gt;3265  Name not found in this collection.&lt;/pre&gt;&lt;pre&gt;3266  Append illegal - field is part of a TableDefs collection.&lt;/pre&gt;&lt;pre&gt;3267 Property can be set only when the field is part of a Recordset object's Fields collection.&lt;/pre&gt;&lt;pre&gt;3268 Can't set this property once the object is part of a collection.&lt;/pre&gt;&lt;pre&gt;3269 Can't append. Index is part of an Indexes collection.&lt;/pre&gt;&lt;pre&gt;3270 Property not found.&lt;/pre&gt;&lt;pre&gt;3271 Invalid property value.&lt;/pre&gt;&lt;pre&gt;3272 Object isn't a collection.&lt;/pre&gt;&lt;pre&gt;3273 Method not applicable for this object.&lt;/pre&gt;&lt;pre&gt;3274 External table isn't in the expected format.&lt;/pre&gt;&lt;pre&gt;3275 Unexpected error from external database driver 'error number'.&lt;/pre&gt;&lt;pre&gt;3276 Invalid database ID.&lt;/pre&gt;&lt;pre&gt;3277 Can't have more than 10 fields in an index.&lt;/pre&gt;&lt;pre&gt;3278 Database engine has not been initialized.&lt;/pre&gt;&lt;pre&gt;3279 Database engine has already been initialized.&lt;/pre&gt;&lt;pre&gt;3280 Can't delete a field that is part of an index or is needed by the system.&lt;/pre&gt;&lt;pre&gt;3281 Can't delete this index.  It is either the current index or is used in a relationship.&lt;/pre&gt;&lt;pre&gt;3282 Can't create field or index in a table that is already defined.&lt;/pre&gt;&lt;pre&gt;3283 Primary key already exists.&lt;/pre&gt;&lt;pre&gt;3284 Index already exists.&lt;/pre&gt;&lt;pre&gt;3285 Invalid index definition.&lt;/pre&gt;&lt;pre&gt;3286 Format of memo file doesn't match specified external database format.&lt;/pre&gt;&lt;pre&gt;3287 Can't create index on the given field.&lt;/pre&gt;&lt;pre&gt;3288 Paradox index is not primary.&lt;/pre&gt;&lt;pre&gt;3289 Syntax error in CONSTRAINT clause.&lt;/pre&gt;&lt;pre&gt;3290 Syntax error in CREATE TABLE statement.&lt;/pre&gt;&lt;pre&gt;3291 Syntax error in CREATE INDEX statement.&lt;/pre&gt;&lt;pre&gt;3292 Syntax error in field definition.&lt;/pre&gt;&lt;pre&gt;3293 Syntax error in ALTER TABLE statement.&lt;/pre&gt;&lt;pre&gt;3294 Syntax error in DROP INDEX statement.&lt;/pre&gt;&lt;pre&gt;3295 Syntax error in DROP TABLE or DROP INDEX.&lt;/pre&gt;&lt;pre&gt;3296 Join expression not supported.&lt;/pre&gt;&lt;pre&gt;3297 Couldn't import table or query.  No records found, or all records contain errors.&lt;/pre&gt;&lt;pre&gt;3298 There are several tables with that name.  Please specify owner in the format 'owner.table'.&lt;/pre&gt;&lt;pre&gt;3299 ODBC Specification Conformance Error 'message'.  This error should be reported to the ODBC driver vendor.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3300 Can't create a relationship.&lt;/pre&gt;&lt;pre&gt;3301 Can't perform this operation; features in this version are not available in databases with older formats.&lt;/pre&gt;&lt;pre&gt;3302 Can't change a rule while the rules for this table are in use.&lt;/pre&gt;&lt;pre&gt;3303 Can't delete this field.  It's part of one or more relationships.&lt;/pre&gt;&lt;pre&gt;3304 You must enter a personal identifier (PID) consisting of at least four and no more than 20 characters and digits.&lt;/pre&gt;&lt;pre&gt;3305 Invalid connection string in pass-through query.&lt;/pre&gt;&lt;pre&gt;3306 At most one field can be returned from a subquery that doesn't use the EXISTS keyword.&lt;/pre&gt;&lt;pre&gt;3307 The number of columns in the two selected tables or queries of a union query don't match.&lt;/pre&gt;&lt;pre&gt;3308 Invalid TOP argument in select query.&lt;/pre&gt;&lt;pre&gt;3309 Property setting can't be larger than 2 KB.&lt;/pre&gt;&lt;pre&gt;3310 This property isn't supported for external data sources or for databases created in a previous version.&lt;/pre&gt;&lt;pre&gt;3311 Property specified already exists.&lt;/pre&gt;&lt;pre&gt;3312 Validation rules and default values can't be placed on system or attached (linked) tables.&lt;/pre&gt;&lt;pre&gt;3313 Can't place this validation expression on this field.&lt;/pre&gt;&lt;pre&gt;3314 Field 'name' can't contain a null value.&lt;/pre&gt;&lt;pre&gt;3315 Field 'name' can't be a zero-length string.&lt;/pre&gt;&lt;pre&gt;3316 'Table-level validation text'.&lt;/pre&gt;&lt;pre&gt;3317 One or more values entered is prohibited by the validation rule 'rule' set for 'name'.&lt;/pre&gt;&lt;pre&gt;3318 Top not allowed in delete queries.&lt;/pre&gt;&lt;pre&gt;3319 Syntax error in union query.&lt;/pre&gt;&lt;pre&gt;3320 'Error' in table-level validation expression.&lt;/pre&gt;&lt;pre&gt;3321 No database specified in connection string or IN clause.&lt;/pre&gt;&lt;pre&gt;3322 Crosstab query contains one or more invalid fixed column headings.&lt;/pre&gt;&lt;pre&gt;3323 The query cannot be used as a row source.&lt;/pre&gt;&lt;pre&gt;3324 The query is a DDL query and cannot be used as a row source.&lt;/pre&gt;&lt;pre&gt;3325 Pass-through query with ReturnsRecords property set to True did not return any records.&lt;/pre&gt;&lt;pre&gt;3326 This Recordset is not updatable.&lt;/pre&gt;&lt;pre&gt;3334 Can be present only in version 1.0 format.&lt;/pre&gt;&lt;pre&gt;3336 Btrieve: Invalid IndexDDF option in initialization setting.&lt;/pre&gt;&lt;pre&gt;3337 Invalid DataCodePage option in initialization setting.&lt;/pre&gt;&lt;pre&gt;3338 Btrieve: Xtrieve options aren't correct in initialization setting.&lt;/pre&gt;&lt;pre&gt;3339 Btrieve: Invalid IndexDeleteRenumber option in initialization setting.&lt;/pre&gt;&lt;pre&gt;3340 Query 'name' is corrupt.&lt;/pre&gt;&lt;pre&gt;3341 Current field must match join key 'name' on 'one' side of outer join.&lt;/pre&gt;&lt;pre&gt;3342 Invalid Memo or OLE object in subquery 'name'.&lt;/pre&gt;&lt;pre&gt;3344 Unknown or invalid reference 'name' in validation expression or default value in table 'name'.&lt;/pre&gt;&lt;pre&gt;3345 Unknown or invalid field reference 'name'.&lt;/pre&gt;&lt;pre&gt;3346 Number of query values and destination fields aren't the same.&lt;/pre&gt;&lt;pre&gt;3349 Numeric field overflow.&lt;/pre&gt;&lt;pre&gt;3350 Object is invalid for operation.&lt;/pre&gt;&lt;pre&gt;3351 ORDER BY expression 'expression' uses non-output fields.&lt;/pre&gt;&lt;pre&gt;3352 No destination field name in INSERT INTO statement 'statement'.&lt;/pre&gt;&lt;pre&gt;3353 Btrieve: Can't find file FIELD.DDF.&lt;/pre&gt;&lt;pre&gt;3354 At most one record can be returned by this subquery.&lt;/pre&gt;&lt;pre&gt;3355 Syntax error in default value.&lt;/pre&gt;&lt;pre&gt;3356 The database is opened by user 'name' on machine 'name'.&lt;/pre&gt;&lt;pre&gt;3357 This query is not a properly formed data-definition query.&lt;/pre&gt;&lt;pre&gt;3358 Can't open Microsoft Jet engine system database.&lt;/pre&gt;&lt;pre&gt;3359 Pass-through query must contain at least one character.&lt;/pre&gt;&lt;pre&gt;3360 Query is too complex.&lt;/pre&gt;&lt;pre&gt;3361 Unions not allowed in a subquery.&lt;/pre&gt;&lt;pre&gt;3362 Single-row update/delete affected more than one row of an attached (linked) table.  Unique index contains duplicate values.&lt;/pre&gt;&lt;pre&gt;3364 Can't use Memo or OLE object field 'name' in SELECT clause of a union query.&lt;/pre&gt;&lt;pre&gt;3365 Can't set this property for remote objects.&lt;/pre&gt;&lt;pre&gt;3366 Can't append a relation with no fields defined.&lt;/pre&gt;&lt;pre&gt;3367 Can't append.  Object already in collection.&lt;/pre&gt;&lt;pre&gt;3368 Relationship must be on the same number of fields with the same data types.&lt;/pre&gt;&lt;pre&gt;3370 Can't modify the design of table 'name'.  It's in a read-only database.&lt;/pre&gt;&lt;pre&gt;3371 Can't find table or constraint.&lt;/pre&gt;&lt;pre&gt;3372 No such index 'name' on table 'name'.&lt;/pre&gt;&lt;pre&gt;3373 Can't create relationship.  Referenced table 'name' doesn't have a primary key.&lt;/pre&gt;&lt;pre&gt;3374 The specified fields are not uniquely indexed in table 'name'.&lt;/pre&gt;&lt;pre&gt;3375 Table 'name' already has an index named 'name'.&lt;/pre&gt;&lt;pre&gt;3376 Table 'name' doesn't exist.&lt;/pre&gt;&lt;pre&gt;3377 No such relationship 'name' on table 'name'.&lt;/pre&gt;&lt;pre&gt;3378 There is already a relationship named 'name' in the current database.&lt;/pre&gt;&lt;pre&gt;3379 Can't create relationships to enforce referential integrity.  Existing data in table 'name' violates referential integrity rules in table 'name'.&lt;/pre&gt;&lt;pre&gt;3380 Field 'name' already exists in table 'name'.&lt;/pre&gt;&lt;pre&gt;3381 There is no field named 'name' in table 'name'.&lt;/pre&gt;&lt;pre&gt;3382 Size of a field 'name' is too long.&lt;/pre&gt;&lt;pre&gt;3383 Can't delete field 'name'.  It's part of one or more relationships.&lt;/pre&gt;&lt;pre&gt;3384 Can't delete a built-in property.&lt;/pre&gt;&lt;pre&gt;3385 User-defined properties don't support a Null value.&lt;/pre&gt;&lt;pre&gt;3386 Property 'name' must be set before using this method.&lt;/pre&gt;&lt;pre&gt;3388 Unknown function 'name' in validation expression or default value on 'name'.&lt;/pre&gt;&lt;pre&gt;3389 Query support unavailable.&lt;/pre&gt;&lt;pre&gt;3390 Account name already exists.&lt;/pre&gt;&lt;pre&gt;3393 Can't perform join, group, or sort.  Combined fields are too long.&lt;/pre&gt;&lt;pre&gt;3394 Can't save property; property is a schema property.&lt;/pre&gt;&lt;pre&gt;3396 Can't perform cascading operation.  Since related records exist in table 'name', referential integrity rules would be violated.&lt;/pre&gt;&lt;pre&gt;3397 Can't perform cascading operation.  There must be a related record in table 'name'.&lt;/pre&gt;&lt;pre&gt;3398 Can't perform cascading operation.  It would result in a null key in table 'name'.&lt;/pre&gt;&lt;pre&gt;3399 Can't perform cascading operation.  It would result in a duplicate key in table 'name'.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3400 Can't perform cascading operation.  It would result in two updates to field 'name' in table 'name'.&lt;/pre&gt;&lt;pre&gt;3401 Can't perform cascading operation.  It would cause field 'name' to become null, which is not allowed.&lt;/pre&gt;&lt;pre&gt;3402 Can't perform cascading operation.  It would cause field 'name' to become a zero-length string, which is not allowed.&lt;/pre&gt;&lt;pre&gt;3403 Can't perform cascading operation: 'validation text'.&lt;/pre&gt;&lt;pre&gt;3404 Can't perform cascading operation.  The value entered is prohibited by the validation rule 'rule' set for 'name'.&lt;/pre&gt;&lt;pre&gt;3405 Error 'error text' in validation rule.&lt;/pre&gt;&lt;pre&gt;3406 Error 'error text' in default value.&lt;/pre&gt;&lt;pre&gt;3407 The server's MSysConf table exists, but is in an incorrect format.  Contact your system administrator.&lt;/pre&gt;&lt;pre&gt;3409 Invalid field name 'name' in definition of index or relationship.&lt;/pre&gt;&lt;pre&gt;3410 Can't open this database for update.&lt;/pre&gt;&lt;pre&gt;3411 Invalid entry.  Can't perform cascading operation in table 'name' because value entered is too big for field 'name'.&lt;/pre&gt;&lt;pre&gt;3413 Can't perform cascading update on table 'name' because it is currently in use by user 'name' on machine 'name'.&lt;/pre&gt;&lt;pre&gt;3414 Can't perform cascading update on table 'name' because it is currently in use.&lt;/pre&gt;&lt;pre&gt;3415 Zero-length string is valid only in a text or Memo field.&lt;/pre&gt;&lt;pre&gt;3416 'reserved error alert'.&lt;/pre&gt;&lt;pre&gt;3417 An action query cannot be used as a row source.&lt;/pre&gt;&lt;pre&gt;3417 Can't have action query as an input.&lt;/pre&gt;&lt;pre&gt;3418 Can't open 'tablename'.  Another user has the table open using a different network control file or locking style.&lt;/pre&gt;&lt;pre&gt;3419 Can't open this Paradox 4.x or 5.x table because ParadoxNetStyle is set to 3.x in the initialization setting.&lt;/pre&gt;&lt;pre&gt;3420 Object is invalid or not set.&lt;/pre&gt;&lt;pre&gt;3421 Data type conversion error.&lt;/pre&gt;&lt;pre&gt;3422 Can't modify table structure.  Another user has the table open.&lt;/pre&gt;&lt;pre&gt;3423 You cannot use ODBC to import from, export to, or link an external Microsoft Access or ISAM database table to your database.&lt;/pre&gt;&lt;pre&gt;3424 Can't create database because Locale is invalid.&lt;/pre&gt;&lt;pre&gt;3428 The Microsoft Jet database engine has found a problem in your database.  To correct the problem, you must repair and compact the database.&lt;/pre&gt;&lt;pre&gt;3429 Incompatible installable ISAM version.&lt;/pre&gt;&lt;pre&gt;3430 While loading the Excel installable ISAM, OLE was unable to initialize.&lt;/pre&gt;&lt;pre&gt;3431 This is not an Excel 5 file.&lt;/pre&gt;&lt;pre&gt;3432 Error opening an Excel 5 file.&lt;/pre&gt;&lt;pre&gt;3433 Invalid parameter in [Excel ISAM] section of the initialization setting.&lt;/pre&gt;&lt;pre&gt;3434 Can't expand named range.&lt;/pre&gt;&lt;pre&gt;3435 Cannot delete Excel cells.&lt;/pre&gt;&lt;pre&gt;3436 Failure creating file.&lt;/pre&gt;&lt;pre&gt;3437 Excel spreadsheet is full.&lt;/pre&gt;&lt;pre&gt;3438 The data being exported does not match the format described in the SCHEMA.INI file.&lt;/pre&gt;&lt;pre&gt;3439 You attempted to attach or import a Microsoft Word mail merge file.  Although you can export such files, you cannot attach or import them.&lt;/pre&gt;&lt;pre&gt;3440 An attempt was made to import or attach to an empty text file.  To import or attach a text file, the file must contain data.&lt;/pre&gt;&lt;pre&gt;3441 Text file specification field seperator matches decimal separator or text delimiter.&lt;/pre&gt;&lt;pre&gt;3442 In the text file specification 'name', the 'name' option is invalid.&lt;/pre&gt;&lt;pre&gt;3443 In the fixed-width specification 'name', the 'name' does not specify a width.&lt;/pre&gt;&lt;pre&gt;3444 The fixed-width specification 'name' contains no column widths.&lt;/pre&gt;&lt;pre&gt;3445 Incorrect version of Jet DLL file was found.&lt;/pre&gt;&lt;pre&gt;3446 Jet VBA file not found.&lt;/pre&gt;&lt;pre&gt;3447 The Jet VBA file failed to initialize when called.&lt;/pre&gt;&lt;pre&gt;3448 OLE system function call failed.&lt;/pre&gt;&lt;pre&gt;3449 No country code found in connect string for an attached (or linked) table.&lt;/pre&gt;&lt;pre&gt;3452 You cannot make changes to the design of the database at this replica.&lt;/pre&gt;&lt;pre&gt;3453 You cannot establish or maintain a relationship to a replicable table during this operation.&lt;/pre&gt;&lt;pre&gt;3455 Cannot make the 'name' object replicable.&lt;/pre&gt;&lt;pre&gt;3456 Cannot make the 'name' object in 'name' container replicable.&lt;/pre&gt;&lt;pre&gt;3457 You cannot set the KeepLocal property for an object that is already replicable.&lt;/pre&gt;&lt;pre&gt;3458 The KeepLocal property cannot be set on a database; it can be set only on the objects in a database.&lt;/pre&gt;&lt;pre&gt;3459 Once a database has been made replicable, it cannot be made unreplicable.&lt;/pre&gt;&lt;pre&gt;3460 The operation you attempted conflicts with an existing operation involving the replica.&lt;/pre&gt;&lt;pre&gt;3461 The replication property you are attempting to set or delete is read-only and cannot be changed.&lt;/pre&gt;&lt;pre&gt;3463 Cannot find the .dll 'name'.&lt;/pre&gt;&lt;pre&gt;3464 Data type mismatch in criteria expression.&lt;/pre&gt;&lt;pre&gt;3465 The disk drive you are attempting to access is unreadable.&lt;/pre&gt;&lt;pre&gt;3472 Disk full for path 'name'.&lt;/pre&gt;&lt;pre&gt;3485 The object cannot be made replicable because the database is not replicable.&lt;/pre&gt;&lt;pre&gt;3486 You cannot add a second ReplicationID Autonumber field to a table.&lt;/pre&gt;&lt;pre&gt;3487 The database you are attempting to make replicable cannot be converted.&lt;/pre&gt;&lt;pre&gt;3488 The value specified is not a ReplicaID for any replica in the replica set.&lt;/pre&gt;&lt;pre&gt;3489 The object specified is not replicable because it is missing a necessary resource.&lt;/pre&gt;&lt;pre&gt;3490 Cannot make a new replica because the 'name' object in 'name' container could not be made replicable.&lt;/pre&gt;&lt;pre&gt;3491 The database must be opened in exclusive mode before it can be made replicable.&lt;/pre&gt;&lt;pre&gt;3492 The synchronization failed because a design change could not be applied to one of the replicas.&lt;/pre&gt;&lt;pre&gt;3499 Can't retrieve the full path information for a replica.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3510 The replica you are attempting to exchange with is currently being used in another exchange.&lt;/pre&gt;&lt;pre&gt;3515 The Microsoft Jet database engine could not read the system clock on your computer.&lt;/pre&gt;&lt;pre&gt;3520 The replica name or ID does not match a currently managed replica.&lt;/pre&gt;&lt;pre&gt;3521 The two replicas cannot be synchronized because there is no common point to start the synchronization.&lt;/pre&gt;&lt;pre&gt;3526 The name selected for the system object is already in use.&lt;/pre&gt;&lt;pre&gt;3531 The wait period for an event has timed-out.&lt;/pre&gt;&lt;pre&gt;3533 The system object used by a process still exists after the process has stopped.&lt;/pre&gt;&lt;pre&gt;3545 The two replicas you are attempting to synchronize are from different replica sets.&lt;/pre&gt;&lt;pre&gt;3546 The type of exchange you are attempting is not valid.&lt;/pre&gt;&lt;pre&gt;3548 GUIDs do not match or the requested GUID could not be found.&lt;/pre&gt;&lt;pre&gt;3549 The filename you provided is too long.&lt;/pre&gt;&lt;pre&gt;3550 There is no index on the GUID column.&lt;/pre&gt;&lt;pre&gt;3552 The size of the registry parameter exceeds the maximum allowed.&lt;/pre&gt;&lt;pre&gt;3553 The GUID could not be created.&lt;/pre&gt;&lt;pre&gt;3555 All valid nicknames for replicas are already in use.&lt;/pre&gt;&lt;pre&gt;3559 Failure to write because destination disk is full.&lt;/pre&gt;&lt;pre&gt;3560 The two replicas you are attempting to synchronize have the same ReplicaID.&lt;/pre&gt;&lt;pre&gt;3561 The two replicas you are attempting to synchronize both have design-master status.&lt;/pre&gt;&lt;pre&gt;3566 Network IO error.&lt;/pre&gt;&lt;pre&gt;3569 The replica has been logically removed from the replica set and is no longer available.&lt;/pre&gt;&lt;pre&gt;3572 A disk IO error occurred while reading or writing to the TEMP directory.&lt;/pre&gt;&lt;pre&gt;3574 The ReplicaID for this replica was reassigned during a move or copy procedure&lt;/pre&gt;&lt;pre&gt;3575 The disk drive you are attempting to write to is full.&lt;/pre&gt;&lt;pre&gt;3576 The database you are attempting to open is already in use by another application.&lt;/pre&gt;&lt;pre&gt;3577 Can't update replication system column.&lt;/pre&gt;&lt;pre&gt;3584 Insufficient memory to complete operation.&lt;/pre&gt;&lt;pre&gt;3592 You cannot make a password-protected database replicable or set password protection on a replicable database.&lt;/pre&gt;&lt;pre&gt;3593 Can't change a replicable database from allowing multiple data masters to allowing only a single data master.&lt;/pre&gt;&lt;pre&gt;3594 Can't change a replicable database from allowing only a single data master to allowing multiple data masters.&lt;/pre&gt;&lt;pre&gt;3595 The system tables in your replica are no longer reliable and the replica should not be used.&lt;/pre&gt;&lt;pre&gt; &lt;/pre&gt;&lt;pre&gt;3605 Synchronizing with a non-replicated database is not allowed. The 'name' database is not replicable.&lt;/pre&gt;&lt;pre&gt;3607 The replication property you are attempting to delete is read-only and cannot be removed.&lt;/pre&gt;&lt;pre&gt;3608 Record length too long for an indexed Paradox table.&lt;/pre&gt;&lt;pre&gt;3609 No unique index found for referenced field of primary table.&lt;/pre&gt;&lt;pre&gt;3610 Same table referenced as both source and destination in make-table query.&lt;/pre&gt;&lt;pre&gt;3611 Can't execute data definition statements on attached data sources.&lt;/pre&gt;&lt;pre&gt;3612 Multi-level GROUP BY clause not allowed in a subquery.&lt;/pre&gt;&lt;pre&gt;3613 Can't create a relationship on attached (or linked) SQL tables.&lt;/pre&gt;&lt;pre&gt;3614 GUID not allowed in Find method criteria expression.&lt;/pre&gt;&lt;pre&gt;3615 Type mismatch in JOIN expression.&lt;/pre&gt;&lt;pre&gt;3616 Updating data in an attached (or linked) table is not supported by this ISAM.&lt;/pre&gt;&lt;pre&gt;3617 Deleting data in an attached (or linked) table is not supported by this ISAM.&lt;/pre&gt;&lt;pre&gt;3620 The connection for viewing your attached Excel worksheet was lost.&lt;/pre&gt;&lt;pre&gt;3621 No country code found in connect string for an attached (or linked) table.&lt;/pre&gt;&lt;pre&gt;3622 No country code found in connect string for an attached (or linked) table.&lt;/pre&gt;&lt;pre&gt;3623 Can't open replication system table 'name' because table is already in use.&lt;/pre&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Verdana,Arial&amp;quot;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 7.5pt; font-family: Arial;"&gt;&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;Reference URL: &lt;a href="http://www.halfile.com/vb.html"&gt;http://www.halfile.com/vb.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Verdana,Arial&amp;quot;;"&gt; &lt;a href="http://www.statcounter.com/" target="_blank"&gt;&lt;noscript&gt;&lt;span style="'text-decoration:none;text-underline:none'"&gt;&lt;img border="0" width="51" height="13" id="_x0000_i1029" src="http://c1.statcounter.com/counter.php?sc_project=235761&amp;amp;java=0" alt="website traffic analysis" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/noscript&gt;&lt;!-- End of StatCounter Code --&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112914977338130382?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112914977338130382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112914977338130382' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112914977338130382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112914977338130382'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/vba-error-codes-and-messages.html' title='VBA Error Codes and messages'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112914743788807581</id><published>2005-10-12T13:03:00.000-07:00</published><updated>2005-10-12T13:03:57.893-07:00</updated><title type='text'>MS Access Vs FileMaker</title><content type='html'>&lt;a href="http://www.filemaker.com/downloads/pdf/fm_access_comparison.pdf"&gt;http://www.filemaker.com/downloads/pdf/fm_access_comparison.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112914743788807581?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112914743788807581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112914743788807581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112914743788807581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112914743788807581'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/ms-access-vs-filemaker.html' title='MS Access Vs FileMaker'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112913857865917770</id><published>2005-10-12T10:31:00.000-07:00</published><updated>2005-10-12T10:50:14.300-07:00</updated><title type='text'>Adding Column Field on Table imported from Xls</title><content type='html'>&lt;span style="font-size:85%;"&gt;I used to get data from Finance in Excel format and they wanted me to put them into an Access Database. The imported tables always end up missing with few column fields necessary in the MS Access Reporting later on. Here is how I did it.&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Private Sub CMD_ImportXlsTable_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;On Error GoTo Err_CMD_ImportXlsTable_Click&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;If IsNull(Me.FileNameCombo) Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;prompt = MsgBox("Please choose the Filename to process.", vbOKOnly, "Warning!!!")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;ImportXlsTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;If Me.FileNameCombo = 2 Then&lt;span style=""&gt;  &lt;/span&gt;'WIRELESS BALANCE ON HAND&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.SetWarnings False&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;'***This corrects the entry WNPM into WNPM-W StockRoom&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.OpenQuery "Update Wireless WNPM to WNPM-W Q", acViewNormal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;'***This corrects the entry in LOC_AV field by removing the blank prefixes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.OpenQuery "Update Imp BOH LOC_AV Q", acViewNormal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.SetWarnings True&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;GoTo ProcessCartons&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;ProcessCartons:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;If Me.FileNameCombo = 7 Then 'Cartons Wireless issued not shipped&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;'***ADD Additional Column Fields called:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;'***Found, Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Dim SQL As String&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;For i = 1 To 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 99pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Select Case i&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 99pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Case 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;SQL = "ALTER TABLE [Wcartons issued not shipped] ADD COLUMN Found YESNO"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.RunSQL SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 99pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Case 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;SQL = "ALTER TABLE [Wcartons issued not shipped] ADD COLUMN Remarks Text(100)"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.RunSQL SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 99pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Case 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;SQL = "ALTER TABLE [Wcartons issued not shipped] ADD COLUMN Count Long"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.RunSQL SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 99pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Case 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;SQL = "ALTER TABLE [Wcartons issued not shipped] ADD COLUMN IBIN Text(50)"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 117pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;DoCmd.RunSQL SQL&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 99pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;End Select&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Next i&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;span style=""&gt;                      &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;'Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Exit_CMD_ImportXlsTable_Click:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Err_CMD_ImportXlsTable_Click:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;MsgBox Err.Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Resume Exit_CMD_ImportXlsTable_Click&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112913857865917770?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112913857865917770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112913857865917770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112913857865917770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112913857865917770'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/adding-column-field-on-table-imported.html' title='Adding Column Field on Table imported from Xls'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112913772125408950</id><published>2005-10-12T10:07:00.000-07:00</published><updated>2005-10-12T10:25:48.510-07:00</updated><title type='text'>Exporting Table into a Backend Database</title><content type='html'>&lt;span style="font-size:85%;"&gt;1. Create first the following function:&lt;br /&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Function PutTableOnBackEnd(DBName As String, TblName As String, DestinationTable As String) As Boolean&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;           &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'DBName should include full path and name of back end database&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim Db As Database&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'test back end&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;On Error Resume Next&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Set Db = OpenDatabase(DBName)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;If Err &lt;&gt; 0 Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'failed to open back end database&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Exit Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;If Not Db Is Nothing Then Db.Close&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'test if table is local&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;If IsNull(DLookup("Type", "MSysObjects", "Name='" &amp; TblName &amp;amp; "' AND Type=1")) Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'table is not local&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Exit Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;        &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'put table on back end&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;'DoCmd.TransferDatabase acExport, "Microsoft Access", DBName, acTable, TblName, TblName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;DoCmd.TransferDatabase acExport, "Microsoft Access", DBName, acTable, TblName, DestinationTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;If Err &lt;&gt; 0 Then GoTo Done&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;           &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'link to the back end table&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'DoCmd.DeleteObject acTable, TblName&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'DoCmd.TransferDatabase acLink, "Microsoft Access", DBName, acTable, TblName, TblName&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;PutTableOnBackEnd = True 'defaults to false if it fails to get here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Done:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;End Function&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;2. Specify the Tables to Export:&lt;br /&gt;&lt;/span&gt;  &lt;/p&gt; &lt;table class="MsoNormalTable" style="background: white none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;" border="1" cellpadding="0" cellspacing="0"&gt;   &lt;thead&gt;   &lt;tr style=""&gt;    &lt;td colspan="4" style="border: medium none ; padding: 0.75pt; background: silver none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"&gt;    &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;color:black;"  &gt;Tables to Export&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr style=""&gt;    &lt;td style="border: 1pt inset black; padding: 0.75pt; background: silver none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"&gt;    &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;color:black;"  &gt;TableID&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border: 1pt inset black; padding: 0.75pt; background: silver none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"&gt;    &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;color:black;"  &gt;TableName&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border: 1pt inset black; padding: 0.75pt; background: silver none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"&gt;    &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;color:black;"  &gt;Directory&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;    &lt;td style="border: 1pt inset black; padding: 0.75pt; background: silver none repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;"&gt;    &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style=";font-family:Arial;color:black;"  &gt;BackEndDB&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/thead&gt;  &lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;1&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;API Control Table&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;\\zwnwb080\groups\API_UPDATES\API\Upload&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;BackEnd.mdb&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;2&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;APIData Table&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;\\zwnwb080\groups\API_UPDATES\API\Upload&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;BackEnd.mdb&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;3&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;Unused ControlNo Table&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;\\zwnwb080\groups\API_UPDATES\API\Upload&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:85%;color:black;"   &gt;BackEnd.mdb&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style=""&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:85%;"&gt;&lt;br /&gt;      &lt;/span&gt;&lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:85%;"&gt;&lt;br /&gt;      &lt;/span&gt;&lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:85%;"&gt;&lt;br /&gt;      &lt;/span&gt;&lt;/td&gt;   &lt;td style="border: 1pt inset silver; padding: 0.75pt;" valign="top"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;span style="font-size:85%;"&gt;&lt;br /&gt;      &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;3. Call the Function in a command button of a form:&lt;br /&gt;&lt;/span&gt;  &lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;       &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Private Sub CMD_ExportTable_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;                  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Dim Result As Boolean&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim strPC As String&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim SourceTable As String&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim DestTable As String&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim strDirectory As String&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim BackEndDB As String&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;       &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;strPC = Me.TxtPCName&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;For i = 1 To 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="text-indent: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 153, 0); font-weight: bold;"&gt;‘Specify the Table Names&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;SourceTable = DLookup("[TableName]", "Tables to Export", "[TableID] =" &amp; i)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;DestTable = strPC &amp; "-" &amp;amp; SourceTable    &lt;span style="color: rgb(0, 153, 0);"&gt;'Here  I attached the PC Name  for Record Purposes&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;strDirectory = DLookup("[Directory]", "Tables to Export", "[TableID] =" &amp; i)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;BackEndDB = DLookup("[BackEndDB]", "Tables to Export", "[TableID] =" &amp; i)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0);"&gt;‘Call the Function&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Result = PutTableOnBackEnd(strDirectory &amp; "\" &amp;amp; BackEndDB, SourceTable, DestTable)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Debug.Print Result&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 27pt;"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;MsgBox ("Finish exporting " &amp;amp; SourceTable)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;Next i&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;        &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Verdana;font-size:85%;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112913772125408950?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112913772125408950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112913772125408950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112913772125408950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112913772125408950'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/exporting-table-into-backend-database.html' title='Exporting Table into a Backend Database'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112879500530535493</id><published>2005-10-08T11:05:00.000-07:00</published><updated>2005-10-08T11:10:05.316-07:00</updated><title type='text'>Compacting Access Db at specified time</title><content type='html'>&lt;a href="http://support.microsoft.com/?id=158937"&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;How to Compact Databases at a Scheduled Time&lt;/span&gt; &lt;div class="appliesToLink"&gt;&lt;a href="#appliesto"&gt;View products that this article  applies to.&lt;br /&gt;&lt;/a&gt; &lt;div class="notice"&gt;Moderate: Requires basic macro, coding, and interoperability  skills.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; SUMMARY: &lt;div class="sbody"&gt;This article describes two methods that you can use to start to  compact one or more databases automatically at a scheduled time. In the first  method, you create a small database with a table, a form, and a macro. The table  stores the names of the databases you want to compact. The form contains a  procedure in the Timer event that starts to compact the databases whose names  are in the table. The macro opens the form every time you open the database. &lt;br /&gt;&lt;br /&gt;In the second method, you can use a scheduling utility, such as the NT  Schedule Service, to open an Access database by using the &lt;b&gt;/compact&lt;/b&gt;  command line switch.&lt;br /&gt;&lt;br /&gt;This article assumes that you are familiar with  Visual Basic for Applications and with creating Access applications by using the  programming tools that are provided with Access. For more information about  Visual Basic for Applications, see your version of the "Building Applications  with Microsoft Access" manual.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: Visual Basic for  Applications is called Microsoft Access Basic in Access version 2.0. For more  information about Access Basic, see the "Building Applications" manual. &lt;/div&gt; &lt;/div&gt; url REFERENCE: &lt;a href="http://support.microsoft.com/?id=158937"&gt;http://support.microsoft.com/?id=158937&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112879500530535493?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112879500530535493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112879500530535493' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112879500530535493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112879500530535493'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/compacting-access-db-at-specified-time.html' title='Compacting Access Db at specified time'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112864272118517821</id><published>2005-10-06T16:51:00.000-07:00</published><updated>2005-10-06T17:10:03.573-07:00</updated><title type='text'>INCREMENTAL NUMBERING SYSTEM</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;INCREMENTAL NUMBERING SYSTEM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;SCENARIO:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; A certain table called API Temp Data needs to have an incremented numbering on ItemNo field. If we use autonumbering we cannot have multiple users entering at the same time in a given table. One item entered may contain number 1 by one user and the other user my have it’s entered item numbered as 2. In order to facilitate the automated numbering system starting with 1 with each user without using the autonumber of MS Acces is to create a procedure that will do the trick for you.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;PROCEDURE:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;The following is a portion of the procedure in the submit Record click event.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;’***START Of INS Procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;’***Programmer: Noel Jerome Q. Noel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘***Contact: &lt;/span&gt;&lt;/b&gt;&lt;st1:personname&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;noeljltd@hotmail.com&lt;/span&gt;&lt;/b&gt;&lt;/st1:PersonName&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘1. Count the number of Records based on the ControlNo that is in the Form&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;RecCount = &lt;span style="color: blue;"&gt;Nz&lt;/span&gt;(DCount("[ControlNo]", "Temp APIData", "[ControlNo]='" &amp; Me.TxtControlNumber &amp;amp; "'"), 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘2. If Record &lt;&gt; to zero then proceed to CallLoop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;If &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;RecCount &lt;&gt; 0 &lt;span style="color: blue;"&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 63pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;GoTo&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; CallLoop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 63pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Me.TxtMultiTicketCounter.Value = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 63pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;GoTo ExitingBasketProcedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;CallLoop:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘3. Set a Variable for the RecordSet you need to update&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Set&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; APITempDB = CurrentDb.OpenRecordset("SELECT * FROM [Temp APIData] WHERE ControlNo = '" &amp; Me.TxtControlNumber &amp;amp; "'")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘4. Initialize a counter called A&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;A = 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘5. Create a Loop Statement that will cycle through the recordset until the end of File&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Do Until&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; APITempDB.EOF&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 63pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;With&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; APITempDB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;.Edit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘6. Each cycle updates ItemNo with counter A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;!ItemNo = A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;.Update&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 81pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;.MoveNext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 63pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End With&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘7. Counter A is incremented by 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 63pt;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;A = A + 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;st1:place&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Loop&lt;/span&gt;&lt;/st1:place&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘8. Close the Recordset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;APITempDB.Close&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Me.TxtMultiTicketCounter.Value = RecCount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;’***END Of INS Procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112864272118517821?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112864272118517821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112864272118517821' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112864272118517821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112864272118517821'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/incremental-numbering-system.html' title='INCREMENTAL NUMBERING SYSTEM'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112864222943878018</id><published>2005-10-06T16:39:00.000-07:00</published><updated>2005-10-06T17:01:40.253-07:00</updated><title type='text'>CHECKING CHARACTER FOR INTEGER OR STRING</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;CHECKING CHARACTER FOR INTEGER OR STRING&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;SCENARIO&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;: A controlNo for inventory is formatted like:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="ltr"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;For Multi Ticket = M05-00001&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="ltr"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;For Single Ticket = S05-00001&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;In order for the user not to enter a different format each character should be validated if they qualify as integer or String.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Here is the procedure in the AfterUpdate of the TxtControlNo Unbound Textbox:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;The following procedure cycles through the series of characters in a textbox&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;'***Start of character Check for ControlNo String&lt;br /&gt;’***Programmer: Noel Jerome Q. Noel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;‘***Contact: &lt;/span&gt;&lt;/b&gt;&lt;st1:personname&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;noeljltd@hotmail.com&lt;/span&gt;&lt;/b&gt;&lt;/st1:PersonName&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: green;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Dim&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; X &lt;span style="color: blue;"&gt;As Integer&lt;/span&gt;, i &lt;span style="color: blue;"&gt;As Integer&lt;/span&gt;, intClength &lt;span style="color: blue;"&gt;As Integer&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Dim&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; intSuffix &lt;span style="color: blue;"&gt;As Long&lt;/span&gt;, NumCheck &lt;span style="color: blue;"&gt;As Variant&lt;/span&gt;, ControlCheck &lt;span style="color: blue;"&gt;As Variant&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Dim&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; RControlNo &lt;span style="color: blue;"&gt;As String&lt;/span&gt;, StringConvert &lt;span style="color: blue;"&gt;As String&lt;/span&gt;, StringCheck &lt;span style="color: blue;"&gt;As String&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;intClength = Len(Me.TxtControlNumber)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;X = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;For&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; i = 1 &lt;span style="color: blue;"&gt;To&lt;/span&gt; intClength&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;RControlNo = &lt;span style="color: blue;"&gt;Right&lt;/span&gt;(Me.TxtControlNumber.Value, intClength - X)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;ControlCheck = &lt;span style="color: blue;"&gt;Left&lt;/span&gt;(RControlNo, 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;NumCheck = &lt;span style="color: blue;"&gt;Nz&lt;/span&gt;(Val(ControlCheck), 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;StringConvert = &lt;span style="color: blue;"&gt;Str&lt;/span&gt;(NumCheck)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;StringCheck = &lt;span style="color: blue;"&gt;Right&lt;/span&gt;(StringConvert, Len(StringConvert) - 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;If &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;ControlCheck &lt;&gt; StringCheck &lt;span style="color: blue;"&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;VarCheckType = "StringVar"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;VarCheckType = "IntegerVar"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style="color: blue;"&gt;Select Case&lt;/span&gt; i&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Case&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; 1&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="color: green;"&gt;'First Character should be string&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;If&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; VarCheckType &lt;&gt; "StringVar" &lt;span style="color: blue;"&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;prompt = MsgBox("You have entered a number instead of text on Character 1 of your ControlNo.", vbOKOnly, "Warning!!!")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Me.TxtControlNumber.Value = &lt;span style="color: blue;"&gt;Null&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Case&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; 4&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="color: green;"&gt;'4th Character should be a dash "-" string&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;If &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;ControlCheck &lt;&gt; "-" &lt;span style="color: blue;"&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;prompt = &lt;span style="color: blue;"&gt;MsgBox&lt;/span&gt;("Character 4 of your ControlNo should be a dash '-' string. Change your ControlNo.", &lt;span style="color: blue;"&gt;vbOKOnly&lt;/span&gt;, "Warning!!!")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Me.TxtControlNumber.Value = &lt;span style="color: blue;"&gt;Null&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Case Else&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; &lt;span style="color: green;"&gt;'Other Characters should be integer&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;If&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; VarCheckType &lt;&gt; "IntegerVar" &lt;span style="color: blue;"&gt;Then&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;prompt = &lt;span style="color: blue;"&gt;MsgBox&lt;/span&gt;("You have entered a text instead of number on Character " &amp; i &amp;amp; " of your ControlNo.", vbOKOnly, "Warning!!!")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Me.TxtControlNumber.Value =&lt;span style="color: blue;"&gt; Null&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;End Select&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;X = X + 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: blue;"&gt;Next&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt; i&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112864222943878018?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112864222943878018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112864222943878018' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112864222943878018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112864222943878018'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/checking-character-for-integer-or.html' title='CHECKING CHARACTER FOR INTEGER OR STRING'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112845940290816293</id><published>2005-10-04T13:54:00.000-07:00</published><updated>2005-10-04T13:56:42.916-07:00</updated><title type='text'>Increment Values in query</title><content type='html'>&lt;a href="http://66.102.7.104/search?q=cache:FR3XAkVm67EJ:www.tek-tips.com/faqs.cfm%3Ffid%3D1155+&amp;hl=en&amp;amp;client=firefox-a"&gt;Reference:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;global IncrementVariable as Long&lt;br /&gt;&lt;br /&gt;function IncrementValues(i) as Long&lt;br /&gt;  IncrementVariable = IncrementVariable + 1&lt;br /&gt;  IncrementValues = IncrementVariable&lt;br /&gt;end function&lt;br /&gt;&lt;br /&gt;Note that it's necessary to pass a value to the function in order to have it count for each record. If you don't include this piece then you'll likely get a lot of 1's in every row instead of the counting result you'd like to see.&lt;br /&gt;&lt;br /&gt;SELECT ... IncrementValues([any_field]) ...&lt;br /&gt;&lt;br /&gt;You can futher customize this function, the following code with start over at 1 every 4 seconds, so if you run a query that numbers your table, it will start over at 1 on it's own next time you run the query (assuming it's &gt; 4 seconds later).&lt;br /&gt;&lt;br /&gt;global IncrementVariable as Long&lt;br /&gt;global lastcall as Date&lt;br /&gt;&lt;br /&gt;Function IncrementValues(i) As Long&lt;br /&gt;If Now &gt; (lastcall + 4 / 60 / 60 / 24) Then&lt;br /&gt;    lastcall = Now&lt;br /&gt;    IncrementVariable = 0&lt;br /&gt;End If&lt;br /&gt;  IncrementVariable = IncrementVariable + 1&lt;br /&gt;  IncrementValues = IncrementVariable&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And this one restarts every 4 seconds, and gives you the option of designating a starting point other than 1.&lt;br /&gt;&lt;br /&gt;Function IncrementValues(i, Optional myBase As Long) As Integer&lt;br /&gt;If Now &gt; (lastcall + 2 / 60 / 60 / 24) Then&lt;br /&gt;    lastcall = Now&lt;br /&gt;    If myBase Then&lt;br /&gt;        IncrementVariable = myBase - 1&lt;br /&gt;    Else&lt;br /&gt;        IncrementVariable = 0&lt;br /&gt;    End If&lt;br /&gt;End If&lt;br /&gt;  IncrementVariable = IncrementVariable + 1&lt;br /&gt;  IncrementValues = IncrementVariable&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Finally, it's a good idea to choose data type Long instead of Integer, in case you have a lot of data... and if you're running on a P75, you might want to omit the timed restart, or do more than a 4 second delay, or it might restart at 1 in the middle of running a long slow query.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112845940290816293?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112845940290816293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112845940290816293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112845940290816293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112845940290816293'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/10/increment-values-in-query.html' title='Increment Values in query'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112733868797422416</id><published>2005-09-21T14:36:00.000-07:00</published><updated>2005-09-21T14:38:07.980-07:00</updated><title type='text'>Limitations of MS Access</title><content type='html'>REFERENCE&lt;a href="http://www.codeguru.com/forum/archive/index.php/t-235929.html"&gt;: http://www.codeguru.com/forum/archive/index.php/t-235929.html&lt;/a&gt;&lt;br /&gt;There is an article Microsoft Access 2000: Choosing between MSDE and Jet (http://www.microsoft.com/sql/techinfo/deployment/70/msdejet.asp) which lists all the limitations of Access database in the Word file (http://www.microsoft.com/sql/techinfo/deployment/70/Access2000MSDE.doc).&lt;br /&gt; Here is extract:&lt;br /&gt; "Appendix B:  Access/Jet (.mdb) Specifications&lt;br /&gt;&lt;br /&gt; File size (.mdb filetype) 2 GB&lt;br /&gt; No. of objects in a database 32,768&lt;br /&gt; Modules 1,000&lt;br /&gt; Number of characters in an object name 64&lt;br /&gt; Number of characters in a password 14&lt;br /&gt; Number of characters in a user name or group name  20&lt;br /&gt; Number of characters in a table name 64&lt;br /&gt; Number of characters in a field name 64&lt;br /&gt; Number of fields in a table 255&lt;br /&gt; Number of open tables  2048.&lt;br /&gt; Table size  1 gigabyte&lt;br /&gt; Number of characters in a Text field  255&lt;br /&gt; No. of characters in a Memo field (data entered via UI) 65,535&lt;br /&gt; No.of char. in a Memo field (data entered programmatically) 1 gigabyte&lt;br /&gt; Size of an OLE Object field 1 gigabyte&lt;br /&gt; Number of indexes in a table 32&lt;br /&gt; Number of fields in an index  10&lt;br /&gt; Number of characters in a validation message 255&lt;br /&gt; Number of characters in a validation rule 2,048&lt;br /&gt; Number of characters in a table or field description  255&lt;br /&gt; Number of characters in a record  2,000&lt;br /&gt; Number of characters in a field property setting  255"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112733868797422416?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112733868797422416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112733868797422416' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112733868797422416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112733868797422416'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/09/limitations-of-ms-access.html' title='Limitations of MS Access'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112719307701120900</id><published>2005-09-19T22:07:00.000-07:00</published><updated>2005-12-10T12:19:55.673-08:00</updated><title type='text'>MS Access Programming JOB Links</title><content type='html'>1. &lt;a href="http://www.craigslist.org/nby/cpg/94461117.html"&gt;http://www.craigslist.org/nby/cpg/94461117.html&lt;br /&gt;&lt;/a&gt;2. &lt;a href="http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=153839"&gt;http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=153839&lt;br /&gt;&lt;/a&gt;3. &lt;a href="http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=149688"&gt;http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=149688&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://dice.salary.com/salarywizard/layoutscripts/swzl_titleselect.asp?zipcode=&amp;metrocode=99&amp;amp;statecode=KY&amp;state=Kentucky&amp;amp;metro=Louisville&amp;city=&amp;amp;geo=Louisville%2C+KY&amp;jobtitle=Account+Representative%2C+Sr.+-+Technology+Sales&amp;amp;search=&amp;narrowdesc=&amp;amp;narrowcode=IT03&amp;r=dice_swzttsbtn_psr&amp;amp;amp;amp;amp;amp;amp;amp;amp;p=&amp;geocode=&amp;amp;viewpagenumber=3"&gt;Dice.Com&lt;/a&gt;&lt;br /&gt;5. &lt;a href="http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=137667"&gt;http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=137667&lt;/a&gt;&lt;br /&gt;6.&lt;a href="http://www.google.ca/search?hl=en&amp;q=MS+Access+Programmer+%2B+jobs&amp;amp;meta="&gt; http://www.google.ca/search?hl=en&amp;q=MS+Access+Programmer+%2B+jobs&amp;amp;meta=&lt;/a&gt;&lt;br /&gt;7. &lt;a href="http://www.net-temps.com/job/suda/965/ms_access_programmer.html"&gt;http://www.net-temps.com/job/suda/965/ms_access_programmer.html&lt;/a&gt;&lt;br /&gt;8. &lt;a href="http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=147624"&gt;http://www.tech-centric.net/search/anonymous/jobdetails.aspx?job=147624&lt;/a&gt;&lt;br /&gt;9. &lt;a href="http://denver.craigslist.org/art/97270542.html"&gt;http://denver.craigslist.org/art/97270542.html&lt;/a&gt;&lt;br /&gt;10. &lt;a href="http://www.net-temps.com/job/sysindmd/NT731/ms_access_programmer.html"&gt;MS Access programmer on Baltimore&lt;/a&gt;&lt;br /&gt;11. &lt;a href="http://www.funjobsreview.com/"&gt;Fun JObs Review&lt;br /&gt;&lt;/a&gt;12. &lt;a href="http://www.craigslist.com/pen/sof/97388307.html"&gt;Cambria Palo Alto MS Access Programming job&lt;br /&gt;http://www.cambria.com/services_access.asp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;RITA'S REFERENCE:&lt;br /&gt;13. &lt;a href="http://www.job4you.com/vb.htm"&gt;http://www.job4you.com/vb.htm&lt;br /&gt;&lt;/a&gt;14. &lt;a href="http://www.careerbuilder.com/JobSeeker/Jobs/JobDetails.aspx?Job_DID=J3H3H06YZ645LX82N6C&amp;siteid=cbindeed&amp;amp;cbRecursionCnt=1&amp;cbsid=114d65fce5be407eba081c92b592976e-184588721-tc-1"&gt;Careerbuilder.com&lt;/a&gt;&lt;br /&gt;15. &lt;a href="http://seeker.dice.com/jobsearch/servlet/JobSearch?op=101&amp;amp;dockey=xml/f/e/fee3097ec078a73cb844f3f0f7c9e1c5@activejobs0"&gt;Microagility&lt;/a&gt;&lt;br /&gt;16.&lt;a href="http://hotjobs.yahoo.com/jobseeker/jobsearch/job_detail.html?job_id=J734356LD"&gt;ALR Asociates Inc.&lt;/a&gt;&lt;br /&gt;17. &lt;a href="http://www.careerbuilder.com/JobSeeker/Jobs/JobDetails.aspx?Job_DID=J3G543770TXNM36V96X&amp;siteid=cbindeed&amp;amp;IPath=EXIND"&gt;KForce.Com&lt;/a&gt;&lt;br /&gt;18.&lt;a href="http://www.net-temps.com/job/adecmast/62039/job.html"&gt; HR System Support Analyst - Adecco Technical&lt;/a&gt;&lt;br /&gt;19. &lt;a href="http://www.indeed.com/jobs?q=ms+access+%28sales+OR+reporting+OR+marketing+OR+operations%29&amp;l=10001&amp;amp;radius=25&amp;from=rss"&gt;Indeed.Com Search Result&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;RESUME RABBIT: &lt;a href="http://wvw.jobseekerweekly.com/cgi-bin/submitwriter.pl?ID=144"&gt;http://wvw.jobseekerweekly.com/cgi-bin/submitwriter.pl?ID=144&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;New Links:&lt;br /&gt;1.  &lt;a href="http://www.programmingfromhome.com/"&gt;http://www.programmingfromhome.com/&lt;br /&gt;&lt;/a&gt;2. &lt;a href="http://www.prgjobs.com/Job.cfm/217090"&gt;http://www.prgjobs.com/Job.cfm/217090&lt;/a&gt;&lt;br /&gt;3.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112719307701120900?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112719307701120900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112719307701120900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112719307701120900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112719307701120900'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/09/ms-access-programming-job-links.html' title='MS Access Programming JOB Links'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112579031577799847</id><published>2005-09-03T16:31:00.000-07:00</published><updated>2005-09-03T16:36:20.146-07:00</updated><title type='text'>Customizing Autonumbers</title><content type='html'>&lt;a href="http://forums.aspfree.com/archive/t-24837/Possible-to-customize-autonumber-in-R"&gt;http://forums.aspfree.com/archive/t-24837/Possible-to-customize-autonumber-in-R&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.pcreview.co.uk/forums/showthread.php?p=6617335#post6617335"&gt;http://www.pcreview.co.uk/forums/showthread.php?p=6617335#post6617335&lt;/a&gt;&lt;br /&gt;Fixing autonumbers that act weird: &lt;a href="http://support.microsoft.com/?kbid=287756"&gt;http://support.microsoft.com/?kbid=287756&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112579031577799847?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112579031577799847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112579031577799847' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112579031577799847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112579031577799847'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/09/customizing-autonumbers.html' title='Customizing Autonumbers'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112558654214423638</id><published>2005-09-01T07:54:00.000-07:00</published><updated>2005-09-01T07:55:42.150-07:00</updated><title type='text'>Number of users Access can Accomodate</title><content type='html'>&lt;a href="http://www.dbforums.com/archive/index.php/t-1079077.html"&gt;http://www.dbforums.com/archive/index.php/t-1079077.html&lt;/a&gt;&lt;br /&gt; I agree Access is a very easy to start with database, but here are the&lt;br /&gt; limitations to what Access can do:&lt;br /&gt;&lt;br /&gt; 1. The theoretical maximum number of concurrent users in an Access database&lt;br /&gt; is 255. However, this figure is just the maximum&lt;br /&gt; number possible, and you are more likely to find that the maximum number of&lt;br /&gt; users is about 50-100, although depending on your&lt;br /&gt; design, this might be less. This should certainly be borne in mind when&lt;br /&gt; starting to design a database, as it is almost guaranteed that&lt;br /&gt; although the initial brief called for only 15 users, after a year of&lt;br /&gt; operation there will probably be twice that using the database.&lt;br /&gt; Therefore over-engineering is required.&lt;br /&gt;&lt;br /&gt; 2. Also, Access isn't configured to run as a client/server database, so it&lt;br /&gt; isn't optimized for running over a network. A true client/server&lt;br /&gt; application will only call the data from the server to the client that are&lt;br /&gt; needed. Therefore, you will probably see some network&lt;br /&gt; performance degradation.&lt;br /&gt;&lt;br /&gt; 3. Access is also limited to how much data it can store. In Access 97, this&lt;br /&gt; is 1 Gigabyte per database, and in Access&lt;br /&gt; 2000 it is 2Gb, although you can have multiple databases used to store&lt;br /&gt; information in.&lt;br /&gt;&lt;br /&gt; I believe this info is relevant for you to decide. I strongly recommmend&lt;br /&gt; that if you haven't yet started with your app design,&lt;br /&gt; switch to SQL as backend, and frontend with something as VB, that gives you&lt;br /&gt; more flexibility and a far better UI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112558654214423638?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112558654214423638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112558654214423638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112558654214423638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112558654214423638'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/09/number-of-users-access-can-accomodate.html' title='Number of users Access can Accomodate'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112520389980494408</id><published>2005-08-27T21:36:00.000-07:00</published><updated>2005-08-27T21:38:19.816-07:00</updated><title type='text'>Making Table using plain VBA</title><content type='html'>&lt;b&gt;One of the fundamental tasks that Access users frequently perform is creating tables. By using the techniques in this column, you can add a menu item to Access that lets you create a simple table with just two mouse clicks.&lt;br /&gt;&lt;a href="http://office.microsoft.com/en-us/assistance/HA010428181033.aspx"&gt;http://office.microsoft.com/en-us/assistance/HA010428181033.aspx&lt;/a&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112520389980494408?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112520389980494408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112520389980494408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112520389980494408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112520389980494408'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/08/making-table-using-plain-vba.html' title='Making Table using plain VBA'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112075709387346780</id><published>2005-07-07T10:09:00.000-07:00</published><updated>2005-07-07T10:24:53.880-07:00</updated><title type='text'>Creating a Clock on your Form</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5438/961/1600/Timer1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5438/961/320/Timer1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Microsoft Access Database Solutions:          Create a working clock on your forms         &lt;p&gt;Looking for that extra special effect to give your Microsoft Access database project a professional flair...Thought about adding a working clock to your Access forms?&lt;/p&gt;         &lt;p&gt; To put a simple text clock on a form, create a Label called lblClock on the form, set the form's TimerInterval to 1000, and the following code behind the Timer Event.&lt;/p&gt;         &lt;p&gt;You can also create two command buttons called cmdClockStart and cmdClockEnd and attach respective code to each to have the clock run on demand.&lt;/p&gt;         &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5438/961/1600/OnTimerEvent.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/5438/961/320/OnTimerEvent.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0); font-family: verdana;font-size:85%;" &gt;'***************** Code Start ***************&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt; &lt;span style="font-weight: bold; font-family: verdana;"&gt; Private Sub Form_Timer()&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: verdana;"&gt;     Me!lblClock.Caption = Format(Now, "dddd, mmm d yyyy, hh:mm:ss AMPM")&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight: bold; font-family: verdana;"&gt;     End Sub&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;         &lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;Private Sub cmdClockStart_Click()&lt;/span&gt;&lt;br /&gt;     Me.TimerInterval = 1000&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     End Sub&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;         &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold; font-family: verdana;"&gt;Private Sub cmdClockEnd_Click()&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family: verdana;"&gt;     Me.TimerInterval = 0&lt;/span&gt;&lt;br /&gt; &lt;span style="font-weight: bold; font-family: verdana;"&gt;     End Sub&lt;/span&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;         '***************** Code End ***************&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112075709387346780?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112075709387346780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112075709387346780' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112075709387346780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112075709387346780'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/07/creating-clock-on-your-form.html' title='Creating a Clock on your Form'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-112051185626114902</id><published>2005-07-04T14:16:00.000-07:00</published><updated>2005-07-04T14:17:36.273-07:00</updated><title type='text'>How to eliminate white space in reports with CanShrink and code in Access 2002</title><content type='html'>&lt;div class="appliesToLink"&gt;&lt;a href="#appliesto"&gt;View products that this article  applies to.&lt;/a&gt;&lt;/div&gt;  &lt;div class="articleProperty"&gt; &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="label"&gt;Article ID&lt;/td&gt; &lt;td class="text"&gt;:&lt;/td&gt; &lt;td class="text"&gt;299011&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="label"&gt;Last Review&lt;/td&gt; &lt;td class="text"&gt;:&lt;/td&gt; &lt;td class="text"&gt;June 23, 2005&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="label"&gt;Revision&lt;/td&gt; &lt;td class="text"&gt;:&lt;/td&gt; &lt;td class="text"&gt;5.0&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;  &lt;div class="notice"&gt;This article was previously published under Q299011&lt;/div&gt;  &lt;div class="notice"&gt; &lt;div class="notice"&gt;For a Microsoft Access 97 version of this article, see  &lt;span&gt;&lt;a class="KBlink" href="/kb/95390/"&gt;95390&lt;/a&gt;&lt;/span&gt;. &lt;/div&gt;Moderate:  Requires basic macro, coding, and interoperability skills.&lt;br /&gt;&lt;br /&gt;This article  applies to a Microsoft Access database (.mdb) and to a Microsoft Access project  (.adp).&lt;br /&gt;&lt;br /&gt;For a Microsoft Access 2000 version of this article, see  &lt;span&gt;&lt;a class="KBlink" href="/kb/210589/EN-US/"&gt;210589&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;  &lt;div class="toc"&gt; &lt;h5&gt;On this page&lt;/h5&gt; &lt;table class="tallTable"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="image"&gt;&lt;a href="#kb1"&gt;&lt;img title="SUMMARY" alt="SUMMARY" src="/library/images/support/kbgraphics/PUBLIC/EN-US/downArrow.gif" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text" colspan="2"&gt;&lt;a href="#kb1"&gt;SUMMARY&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="image"&gt;&lt;a href="#kb2"&gt;&lt;img title="MORE INFORMATION" alt="MORE INFORMATION" src="/library/images/support/kbgraphics/PUBLIC/EN-US/downArrow.gif" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text" colspan="2"&gt;&lt;a href="#kb2"&gt;MORE INFORMATION&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="image"&gt;&lt;a href="#kb3"&gt;&lt;img title="REFERENCES" alt="REFERENCES" src="/library/images/support/kbgraphics/PUBLIC/EN-US/downArrow.gif" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text" colspan="2"&gt;&lt;a href="#kb3"&gt;REFERENCES&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="image"&gt;&lt;a href="#appliesto"&gt;&lt;img title="APPLIES TO" alt="APPLIES TO" src="/library/images/support/kbgraphics/PUBLIC/EN-US/downArrow.gif" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text" colspan="2"&gt;&lt;a href="#appliesto"&gt;APPLIES  TO&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;  &lt;div class="section"&gt; &lt;h2 class="subTitle"&gt;SUMMARY&lt;/h2&gt; &lt;div class="sbody"&gt;Before you print a form or a report, you can save space by  conditionally reducing the size of the controls on the form or report. For  example, you might want to reduce the size of text boxes that contain  varied-length text, or reduce the size of text boxes bound to fields that could  be empty.&lt;br /&gt;&lt;br /&gt;Before you try to reduce the size of controls in reports,  however, consider the following:  &lt;table class="list"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="bullet"&gt;•&lt;/td&gt; &lt;td class="text"&gt;Overlapping controls will not shrink, even when the  &lt;b&gt;CanShrink&lt;/b&gt; property is set to &lt;b&gt;Yes&lt;/b&gt;. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="bullet"&gt;•&lt;/td&gt; &lt;td class="text"&gt;Controls shrink line by line (vertically). This means, for  example, that if there is a group of controls placed on the left side of the  page and a large control (for example, an OLE picture) on the right side of the  page, the controls on the left side of the page will not shrink, unless the  picture is blank and hidden. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="bullet"&gt;•&lt;/td&gt; &lt;td class="text"&gt;Space between controls is not affected by the &lt;b&gt;CanShrink&lt;/b&gt; or  &lt;b&gt;CanGrow&lt;/b&gt; property. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td class="bullet"&gt;•&lt;/td&gt; &lt;td class="text"&gt;Controls located in the page header or page footer can shrink and  grow. However, the sections do not have &lt;b&gt;CanGrow&lt;/b&gt; and &lt;b&gt;CanShrink&lt;/b&gt;  properties. This means, you can still have blank space in a page header or page  footer section (even though its controls may shrink).  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Microsoft provides programming examples for  illustration only, without warranty either expressed or implied. This includes,  but is not limited to, the implied warranties of merchantability or fitness for  a particular purpose. This article assumes that you are familiar with the  programming language that is being demonstrated and with the tools that are used  to create and to debug procedures. Microsoft support engineers can help explain  the functionality of a particular procedure, but they will not modify these  examples to provide added functionality or construct procedures to meet your  specific requirements.  &lt;div class="topOfPage"&gt; &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="image"&gt;&lt;a href="#toc"&gt;&lt;img title="Back to the top" alt="Back to the top" src="/library/images/support/kbgraphics/public/en-us/upArrow.gif" /&gt;&lt;/a&gt;&lt;/td&gt; &lt;td class="text"&gt;&lt;a href="#toc"&gt;Back to the  top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt; &lt;h2 class="subTitle"&gt;MORE INFORMATION&lt;/h2&gt; &lt;div class="sbody"&gt;A control containing null information automatically shrinks to  nothing and disappears when its &lt;b&gt;CanShrink&lt;/b&gt; property is set to &lt;b&gt;Yes&lt;/b&gt;,  but the space between the controls is not affected by the &lt;b&gt;CanShrink&lt;/b&gt;  property.&lt;br /&gt;&lt;br /&gt;For example, say you have 11 controls in a column of a report,  and there is .1 inch of space between each control. Even if all 11 controls  contain null information and all 11 have their &lt;b&gt;CanShrink&lt;/b&gt; property set to  &lt;b&gt;Yes&lt;/b&gt;, the space between the controls adds up to 1 inch. When you print the  report, even though the 11 controls are not printed, the first control that does  contain text will be printed 1 inch lower than you might expect because of all  the accumulated space.&lt;br /&gt;&lt;br /&gt;A good way to manage the size of your controls is  to have as few controls as possible. This will minimize the white space between  the controls.&lt;br /&gt;&lt;br /&gt;The following example demonstrates how to print mailing  labels by using a Visual Basic function to minimize the number of controls and  to give you even spacing. Say you want to create mailing labels containing a  name, business name, address, city, state, and zip code. You could use several  different fields, but it would be better to use a single text box, as in the  following step-by-step example.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CAUTION&lt;/b&gt;: If you follow the steps  in this example, you modify the sample database Northwind.mdb. You may want to  back up the Northwind.mdb file and follow these steps on a copy of the database.&lt;br /&gt;&lt;br /&gt;More info: &lt;a href="http://support.microsoft.com/?kbid=299011"&gt;http://support.microsoft.com/?kbid=299011&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-112051185626114902?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/112051185626114902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=112051185626114902' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112051185626114902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/112051185626114902'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/07/how-to-eliminate-white-space-in.html' title='How to eliminate white space in reports with CanShrink and code in Access 2002'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111946919400764397</id><published>2005-06-22T12:35:00.000-07:00</published><updated>2005-06-22T12:56:34.186-07:00</updated><title type='text'>Goto Record Command in a Form</title><content type='html'>This command comes very handy when you want to process the record one by one or test single records against another table.&lt;br /&gt;&lt;br /&gt;           &lt;p class="MsoNormal"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;Private Sub Form_Open(Cancel As Integer)&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Dim &lt;b&gt;intNPWCount&lt;/b&gt; As Integer&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;Dim strNPWGID As String&lt;br /&gt;Dim FName As String&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;" &gt;FName&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt; = Me.Form.Name&lt;b&gt;&lt;br /&gt;intNPWCount&lt;/b&gt; = Nz(DCount("[MPGID]", "MPW_Weekly_TimeTracker", "[DeptID]='" &amp; &lt;span style=""&gt; &lt;/span&gt;Forms![ManpowerOTPopulationF].[ComboDeptID] &amp;amp; "' And [WKNO]=" &amp; Forms![ManpowerOTPopulationF].[TxtWKNO]), 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;If intNPWCount &lt;&gt; 0 Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;For A = 1 To intNPWCount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="font-size:85%;"&gt;&lt;b&gt;&lt;span style=";font-family:Verdana;color:red;"  &gt;DoCmd.GoToRecord acDataForm, FName, acGoTo, A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.75in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;&lt;span style=""&gt; &lt;/span&gt;‘Other Commands &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;Next A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;Else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;&lt;span style=""&gt;   &lt;/span&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:85%;"  &gt;End If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:8;"  &gt;&lt;span style="font-size:85%;"&gt;End Sub&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color: rgb(17, 94, 148);font-family:Verdana;font-size:8;"  &gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111946919400764397?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111946919400764397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111946919400764397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111946919400764397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111946919400764397'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/06/goto-record-command-in-form.html' title='Goto Record Command in a Form'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111877175307453264</id><published>2005-06-14T10:54:00.000-07:00</published><updated>2005-06-14T10:55:53.080-07:00</updated><title type='text'>How do I log users off a database and keep them off?</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The following provides a methodology to allow the developer to schedule and enforce periods of downtime for any number of databases.&lt;br /&gt;&lt;br /&gt;Define a database, ie, TimeCtl. All users should have read access to the database, but must not be able to change/move/delete the database or anything within the database.&lt;br /&gt;Define a table, tblLogOut on the TimeCtl database having the following fields per row.&lt;br /&gt;--ApplicationName text(50)   primary key&lt;br /&gt;--LogoffStart    date/time&lt;br /&gt;--LogoffEnd    datetime&lt;br /&gt;--Inactive     Boolean&lt;br /&gt;&lt;br /&gt;you will have one row for every active database. The application name is the database name only without the mdb. It is not the full path name. For example, if you database is DrugCourt.mdb the applicationname on tblLogOut is DrugCourt.&lt;br /&gt;LogoffStart is the date and time you want to insure that all users cannot access applicationname. LogoffEnd is the date and time the users can begin to use applicationname again.&lt;br /&gt;If the inactive flag is true, the record will never be checked again. This allows you to keep a historical track of your scheduled down time.&lt;br /&gt;&lt;br /&gt;In TimeCtl, create a module called gfunctions (global functions). Cut and paste the following function into gfunctions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function funShutDown(DatabaseName As String) As Boolean: funShutDown = False&lt;br /&gt;&lt;br /&gt;Dim db As Database&lt;br /&gt;Dim rs As Recordset&lt;br /&gt;Dim strSQL As String&lt;br /&gt;&lt;br /&gt;DatabaseName = UCase(DatabaseName)&lt;br /&gt;Dim myDate As Date: myDate = Now()&lt;br /&gt;strSQL = "SELECT * FROM TBLLOGOUT WHERE APPLICATIONNAME = '" _&lt;br /&gt;    &amp; DatabaseName &amp;amp; "' AND INACTIVE = 0 AND #" &amp; myDate &amp;amp; "# BETWEEN LOGOFFSTART AND LOGOFFEND"&lt;br /&gt;Set db = CurrentDb&lt;br /&gt;Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)&lt;br /&gt;If rs.RecordCount = 0 Then&lt;br /&gt;    GoTo OutShutDown&lt;br /&gt;Else&lt;br /&gt;    funShutDown = True&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;OutShutDown:&lt;br /&gt;    rs.Close&lt;br /&gt;    Set rs = Nothing&lt;br /&gt;    Set db = Nothing&lt;br /&gt;    Exit Function&lt;br /&gt;   &lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;WATCH OUT FOR WORD WRAP.&lt;br /&gt;&lt;br /&gt;On each database that is now represented on tblogout, establish a reference to the timecontrol database. This will allow you to call funShutDown from that database.&lt;br /&gt;Link tbllogout to your database. Again, we don’t care if the user can see this table as long as he can’t do anything else but see information.&lt;br /&gt;&lt;br /&gt;In your application database create an unbound form with one textbox. Place the following code on the open form event.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Form_Open(Cancel As Integer)&lt;br /&gt;&lt;br /&gt;If funShutdown(UCase("drug court")) = True Then&lt;br /&gt;    Application.Quit&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;This insures that a user who attempts to log on during the scheduled down time will fail to do so.&lt;br /&gt;&lt;br /&gt;Set the forms timer interval to 300000 (5 minutes). The following is the forms timer event.&lt;br /&gt;&lt;br /&gt;Private Sub Form_Timer()&lt;br /&gt;&lt;br /&gt;If funShutdown("drug court") = True Then&lt;br /&gt;    Application.Quit&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;In the startup routine of your database, open this form hidden.&lt;br /&gt;&lt;br /&gt;Every 5 minutes, your database will test if it should shut down. If down time is scheduled it will shut down within 5 minutes of the downtime start time.&lt;br /&gt;&lt;br /&gt;Reference: &lt;a href="http://www.tek-tips.com/faqs.cfm?fid=2145"&gt;http://www.tek-tips.com/faqs.cfm?fid=2145&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111877175307453264?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111877175307453264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111877175307453264' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111877175307453264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111877175307453264'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/06/how-do-i-log-users-off-database-and.html' title='How do I log users off a database and keep them off?'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111773085090080699</id><published>2005-06-02T09:46:00.000-07:00</published><updated>2005-06-02T09:47:30.903-07:00</updated><title type='text'>Hide a table in Database Window</title><content type='html'>(Q)    Can I hide a table so that it doesn't appear in the Database window?&lt;br /&gt;&lt;br /&gt; (A)    If you want to hide a table in the database windows so that other users can't select it, preface the table's name with 'Usys'. For example, if your table's name is employee, change it to UsysEmployee. This makes your table into a system object which access does not display. To see this table later, choose view, options, show system objects.&lt;br /&gt;&lt;br /&gt;More Reference: &lt;a href="http://www.mvps.org/access/tables/tbl0004.htm"&gt;The Access Web&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111773085090080699?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111773085090080699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111773085090080699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111773085090080699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111773085090080699'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/06/hide-table-in-database-window.html' title='Hide a table in Database Window'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111591532229835023</id><published>2005-05-12T09:28:00.000-07:00</published><updated>2005-05-12T09:28:42.306-07:00</updated><title type='text'></title><content type='html'>&lt;a href='http://photos1.blogger.com/img/110/5107/1024/Ucase1.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/img/110/5107/400/Ucase1.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Upper Case Function in access: The upper case function of MS Access is done by issuing the prefix command UCase before the field you want to change into upper case.&amp;nbsp;&lt;a href='http://www.hello.com/' target='ext'&gt;&lt;img src='http://photos1.blogger.com/pbh.gif' alt='Posted by Hello' border='0' style='border:0px;padding:0px;background:transparent;' align='absmiddle'&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111591532229835023?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111591532229835023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111591532229835023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111591532229835023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111591532229835023'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/05/upper-case-function-in-access-upper.html' title=''/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111539330680939366</id><published>2005-05-06T08:27:00.000-07:00</published><updated>2005-05-06T08:29:16.813-07:00</updated><title type='text'>Removing Filter of a Form through VBA</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Procedure for Preset Filters:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Private Sub CMDRemoveFilter_Click()&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Me.Filter = ""&lt;/span&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;Double quote removes the filter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111539330680939366?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111539330680939366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111539330680939366' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111539330680939366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111539330680939366'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/05/removing-filter-of-form-through-vba.html' title='Removing Filter of a Form through VBA'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111506780529806568</id><published>2005-05-02T14:01:00.000-07:00</published><updated>2005-05-02T14:03:25.343-07:00</updated><title type='text'>Filtering a Form through VBA</title><content type='html'>&lt;h2&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Procedure for Preset Filters:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Private Sub CMDNullSalaries_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Dim strNull As String&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;strNull = "(([Salary Query Form].[HR Salary] Is Null))"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Me.Form.Filter = strNull&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Me.FilterOn = True&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;h2&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;Form “Salary Query Form” will display only the Record of whose “HR Salary” field contains nothing. &lt;br /&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;&lt;span style="font-weight: bold;"&gt;Procedure for filters passed from a Combo List:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;     &lt;h2&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148); font-weight: normal; font-style: normal;"&gt;Private Sub CMDFilter_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;On Error GoTo Err_CMDFilter_Click&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Dim &lt;b&gt;vFilter&lt;/b&gt; As String&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;vFilter = Forms![Salary Query Form]![DeptFilterCombo]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Me.Filter = "DeptID =&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: red;"&gt;'&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;" &amp; vFilter &amp;amp; "&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: red;"&gt;'&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;"&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Me.FilterOn = True&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Exit_CMDFilter_Click:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;&lt;span style=""&gt;    &lt;/span&gt;Exit Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Err_CMDFilter_Click:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;&lt;span style=""&gt;    &lt;/span&gt;MsgBox Err.Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;&lt;span style=""&gt;    &lt;/span&gt;Resume Exit_CMDFilter_Click&lt;span style=""&gt;   &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;h2&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148); font-weight: normal; font-style: normal;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;   &lt;h2&gt;&lt;span style="font-size: 10pt; font-family: Verdana;"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;span style=""&gt;1.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="ltr"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;vFilter variable is declared.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;span style=""&gt;2.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="ltr"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;vFilter variable takes the value from &lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;Forms![Salary Query Form]![DeptFilterCombo]&lt;/span&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;span style=""&gt;3.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="ltr"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;DeptID Field will then be filtered with the value from vFilter variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;NOTE: If the variable contains string, then vFilter should be enclosed by single quote.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;"DeptID =&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: red;"&gt;'&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;" &amp; vFilter &amp;amp; "&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: red;"&gt;'&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 8pt; font-family: Verdana; color: rgb(17, 94, 148);"&gt;"&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;&lt;span style=""&gt;4.&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="ltr"&gt;&lt;span style="font-size: 8.5pt; font-family: Verdana;"&gt;Declare Me.FilterOn as True. This is to activate filter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111506780529806568?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111506780529806568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111506780529806568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111506780529806568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111506780529806568'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/05/filtering-form-through-vba.html' title='Filtering a Form through VBA'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111479648632931889</id><published>2005-04-29T10:41:00.000-07:00</published><updated>2005-04-29T10:41:26.330-07:00</updated><title type='text'></title><content type='html'>&lt;a href='http://photos1.blogger.com/img/110/5107/640/AccessToExcel.jpg'&gt;&lt;img border='0' style='border:1px solid #000000; margin:2px' src='http://photos1.blogger.com/img/110/5107/400/AccessToExcel.jpg'&gt;&lt;/a&gt;&lt;br /&gt;Passing Value from Access to Excel Range. The following blog will share to you how the File location directory will be passed to a Range in an Excel Spreadsheet.&amp;nbsp;&lt;a href='http://www.hello.com/' target='ext'&gt;&lt;img src='http://photos1.blogger.com/pbh.gif' alt='Posted by Hello' border='0' style='border:0px;padding:0px;background:transparent;' align='absmiddle'&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111479648632931889?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111479648632931889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111479648632931889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111479648632931889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111479648632931889'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/04/passing-value-from-access-_111479648632931889.html' title=''/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111478707743945425</id><published>2005-04-29T07:45:00.000-07:00</published><updated>2005-04-29T08:06:26.196-07:00</updated><title type='text'>Passing Value from Access to Excel Range</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Here is a simple way of passing a value from MS Access to an Excel File that is being opened by MS Access.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);font-family:verdana;" &gt;Situation:&lt;/span&gt;&lt;span style="font-family:verdana;"&gt; I have an MS Access Database form(A) which exports a query(B) to a certain directory as an excel file. This query is going to be used by an Excel Spreadsheet(C) which is preformatted for calculation and reporting. Now, as I open the preformatted Excel Spreadsheet(C) from Access(A) I would like to pass the directory location where I saved the query as xls (B) to SpreadSheet(C). This directory will be then used by Excel to know where to automatically pick-up the xls query(B) so that it can create pivot tables and other reports from (B).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(A) MS Access Form: This form has fields with directory location assigned as Me.DirLoc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(B) Query exported as XLS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;(C) Preformatted XLS with loaded Macro to auto-fetch (B)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);font-family:verdana;" &gt;Private Sub CmdRunRegenerator_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        Dim DistDir&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        Dim ReportCreator As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        ReportCreator = Me.Regenerator&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        DestDir = Me.DIRLoc&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        Dim objXL As Object, x&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        On Error Resume Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        Set objXL = CreateObject("Excel.Application")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        With objXL.Application&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            .Visible = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            'Open the Workbook&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            .Workbooks.Open DestDir &amp; "\" &amp;amp; ReportCreator&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            'Include CARMA in menu, run AutoOpen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            .ActiveWorkbook.RunAutoMacros xlAutoOpen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &lt;span style="color: rgb(255, 0, 0);"&gt;.ActiveWorkbook.Sheets("Sheet1").Range("D9").Value = Me.DIRLoc&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            x = .Run("RegenerateEmpFile")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            .ActiveWorkbook.Save&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            .ActiveWorkbook.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            objXL.Quit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            'AccountsViewEngine&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            'Auto_Open&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        End With&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        Set objXL = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        UpdateSource&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        ClearInputOutputFiles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;        MsgBox ("Update completed and imported xls file cleared.")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;NOTE:&lt;/span&gt; The line highlighted in red is the command to pass the value of the Directory location in the MS Access form to the spreadsheet being opened.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111478707743945425?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111478707743945425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111478707743945425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111478707743945425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111478707743945425'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/04/passing-value-from-access-to-excel.html' title='Passing Value from Access to Excel Range'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111360166713346501</id><published>2005-04-15T08:14:00.000-07:00</published><updated>2005-04-15T15:13:38.456-07:00</updated><title type='text'>Access Data Definition Language - Creating and Altering Tables On The Fly</title><content type='html'>One of the first things an Access developer learns is how to write SQL Queries. A simple request for data might look something like this:&lt;br /&gt; SELECT FullName, Address, Phone&lt;br /&gt; FROM tblEmployee ORDER BY FullName&lt;br /&gt;This type of query uses Data Manipulation Language (DML). While this example does not perform any great manipulation of the data, some very clever calculations are possible. The SQL language is powerful indeed.&lt;br /&gt;However, once you have gotten a handle on DML, you will want to explore the world of DDL, Data Definition Language. This too is part of the SQL language and can be run from an Access query, or through VBA code, but unlike DML, these commands do not return a result set. DDL is used to create and alter database objects, such as tables. First, let's see how this is done and then consider some scenarios where this technique will save you time and in some cases, a lot of work.&lt;br /&gt;&lt;br /&gt;The process to create a DDL query is a little different from what you might be used to. Begin in the normal way, by choosing New Query from the Query window, but when prompted, do not add any tables. You are then presented with the QBE (query by example) grid with no tables. Select Data Definition from the Query | SQL Specific menu to continue.&lt;br /&gt;&lt;br /&gt;Selecting Data Definition will take you to a very plain, Notepad-like interface where you can paste or type in your DDL SQL script. Save the query and select Run from the Query menu to execute the script. When you run this kind of query, Microsoft Access displays the following warning:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PROBLEM:&lt;/span&gt;An employee table needs to have their salary updated based from an imported excel file containing the Global ID of the Employees with matching Salary changes. When importing the Excel spreadsheet it automatically set the data type of the Global ID field into numbers. This creates an error when doing an update because the Access table to be updated contains a Global ID field that is preset to data type text.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SUGGESTION:&lt;/span&gt;Change the Global ID Data type of the imported Excel Spreadsheet into Text on the fly, before executing the update command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SOLUTION:&lt;/span&gt;&lt;br /&gt;1. Invoke a query. From Object Window click Queries, Click New, Design View, OK, Close, Click Query Grid. From the Main Menu click Query, SQL Specific, Data Definition.&lt;br /&gt;2. Inside the query window Type: ALTER TABLE [Source Table] ALTER COLUMN GID Text;&lt;br /&gt;3. Save the query. With my example I saved it as AlterSourceTableQ&lt;br /&gt;4. Call the query inside your procedure:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Private Sub CMDImportEmpFile_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Dim SQL As String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;DoCmd.SetWarnings False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;SQL =&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;"DELETE [Source Table].* "&lt;/span&gt; &amp; _&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     "FROM [Source Table];"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;DoCmd.RunSQL SQL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;DoCmd.OpenQuery&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; "AlterSourceTableQ"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;DoCmd.OpenQuery&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;"UpdateSourceFromImportedFileQ"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;DoCmd.SetWarnings True&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To find out more....&lt;a href="http://www.databasejournal.com/features/msaccess/article.php/3460771"&gt;&lt;click&gt;Click here&lt;/click&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111360166713346501?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111360166713346501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111360166713346501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111360166713346501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111360166713346501'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/04/access-data-definition-language.html' title='Access Data Definition Language - Creating and Altering Tables On The Fly'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111342177515539398</id><published>2005-04-13T12:44:00.000-07:00</published><updated>2005-04-13T12:49:35.163-07:00</updated><title type='text'>Opening Excel from MS Access thru VBA</title><content type='html'>This procedure opens up the excel sheet from a given directory and run a macro from within excel.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;Private Sub CmdOpenframedetailedCombiner_Click()&lt;/span&gt;&lt;br /&gt;Dim &lt;span style="color: rgb(51, 51, 255);"&gt;strPath&lt;/span&gt; As String&lt;br /&gt;Dim &lt;span style="color: rgb(51, 51, 255);"&gt;strFile&lt;/span&gt;Name As String&lt;br /&gt;Dim &lt;span style="color: rgb(51, 51, 255);"&gt;strSourceDir&lt;/span&gt; As String&lt;br /&gt;Dim &lt;span style="color: rgb(51, 51, 255);"&gt;strSheetName&lt;/span&gt; As String&lt;br /&gt;Dim &lt;span style="color: rgb(51, 51, 255);"&gt;xlApp&lt;/span&gt; As Object&lt;br /&gt;Dim &lt;span style="color: rgb(51, 51, 255);"&gt;xlSheet&lt;/span&gt; As Object&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;strSourceDir&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 0);"&gt;"\\zwnwb080\Groups3\CDMAProd\PRODUCTION SERVICE SHEETS\daily web plan\"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;strFileName &lt;/span&gt;= &lt;span style="color: rgb(255, 0, 0);"&gt;"frame and detailed combiner v7 with GSM Update.xls"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;strPath&lt;/span&gt; = strSourceDir &amp; strFileName&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;strSheetName&lt;/span&gt; = &lt;span style="color: rgb(255, 0, 0);"&gt;"detailed"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Set xlApp = CreateObject(&lt;span style="color: rgb(255, 0, 0);"&gt;"Excel.Application"&lt;/span&gt;)&lt;br /&gt;    With xlApp&lt;br /&gt;    .Visible = &lt;span style="color: rgb(0, 0, 0);"&gt;True&lt;/span&gt;&lt;br /&gt;    .Workbooks.Open&lt;span style="color: rgb(51, 51, 255);"&gt; strPath&lt;/span&gt;&lt;br /&gt;    .Run &lt;span style="color: rgb(255, 0, 0);"&gt;"UpdateDetailedFromForXlsdetailedQ"&lt;/span&gt;&lt;br /&gt;    End With&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111342177515539398?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111342177515539398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111342177515539398' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111342177515539398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111342177515539398'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/04/opening-excel-from-ms-access-thru-vba.html' title='Opening Excel from MS Access thru VBA'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12101256.post-111325053367082816</id><published>2005-04-11T12:40:00.000-07:00</published><updated>2005-04-11T13:23:19.630-07:00</updated><title type='text'>Exporting Query to Excel using VBA</title><content type='html'>Before you perform the export operation you have to  follow simple steps to  produce the right output you want:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 51);"&gt;1. &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 204, 51);"&gt;IDENTIFY Source Query.&lt;/span&gt;&lt;br /&gt;The Query is called : ExpenseSummarySelectQ&lt;br /&gt; We will assign a variable called: stDocName for ExpenseSummarySelectQ&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;2. &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 204, 0);"&gt;IDENTIFY Output File and Directory.&lt;/span&gt;&lt;br /&gt;The output Excel file will be called: ExpenseSummarySelect 04-11-05.xls&lt;br /&gt;The directory this file will be exported is: \\zwnwb080\Expense&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;3. &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 204, 0);"&gt;SET VARIABLES and their types.&lt;/span&gt;&lt;br /&gt; "ExpenseSummarySelectQ" =  stDocName  type String&lt;br /&gt; "ExpenseSummary" = FileName type String&lt;br /&gt; "04-11-05" = tDate As String&lt;br /&gt;  "\\zwnwb080\Expense\" = FileDir As String&lt;br /&gt;&lt;br /&gt;  To combine the filename and Directory like this:&lt;br /&gt;  \\zwnwb080\Expense\ExpenseSummary 04-11-05.xls&lt;br /&gt;  You need to  combine variables too:&lt;br /&gt;  XFile =  FileDir &amp;   FileName &amp;amp; tDate &amp; " .xls"&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;6. &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 204, 0);"&gt;Compose your Procedure.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;    Private Sub CMDRunExpSummarySelectQ_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 51);"&gt;          Dim&lt;/span&gt; stDocName &lt;span style="color: rgb(51, 204, 0);"&gt;As String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;          Dim&lt;/span&gt; FileName &lt;span style="color: rgb(51, 204, 0);"&gt;As String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;          Dim&lt;/span&gt; XFile &lt;span style="color: rgb(0, 153, 0);"&gt;As String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;          Dim&lt;/span&gt; tDate &lt;span style="color: rgb(51, 204, 0);"&gt;As String&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;          Dim&lt;/span&gt; FileDir &lt;span style="color: rgb(51, 204, 0);"&gt;As String&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;       stDocName = &lt;span style="color: rgb(255, 0, 0);"&gt;"ExpenseSummarySelectQ"&lt;/span&gt;&lt;br /&gt;       FileName = &lt;span style="color: rgb(255, 0, 0);"&gt;"ExpenseSummary"&lt;/span&gt;&lt;br /&gt;       tDate = &lt;span style="color: rgb(51, 204, 0);"&gt;Format(Now(),&lt;/span&gt; "mm-dd-yy"&lt;span style="color: rgb(51, 204, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;       FileDir = &lt;span style="color: rgb(255, 0, 0);"&gt;"\\zwnwb080\"&lt;/span&gt;&lt;br /&gt;       xFile =  FileDir &amp;  FileName &amp;amp; tDate &amp; &lt;span style="color: rgb(255, 0, 0);"&gt;" .xls"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;        DoCmd.OpenQuery&lt;/span&gt; stDocName, &lt;span style="color: rgb(51, 204, 0);"&gt;acNormal, acEdit&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;        DoCmd.OutputTo acOutputQuery&lt;/span&gt;, "ExpenseSummarySelectQ", _&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;                     acFormatXLS&lt;/span&gt;, xFile, &lt;span style="color: rgb(51, 204, 0);"&gt;False&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;        DoCmd.Close acQuery&lt;/span&gt;, "ExpenseSummarySelectQ", &lt;span style="color: rgb(51, 204, 0);"&gt;acSaveNo&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;        MsgBox &lt;/span&gt;(xFile &amp;amp;amp; " in " &amp; FileDir &amp;amp; " had been created. Excel Report will now be created.")&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;    End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12101256-111325053367082816?l=msaccess.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccess.blogspot.com/feeds/111325053367082816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12101256&amp;postID=111325053367082816' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111325053367082816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12101256/posts/default/111325053367082816'/><link rel='alternate' type='text/html' href='http://msaccess.blogspot.com/2005/04/exporting-query-to-excel-using-vba.html' title='Exporting Query to Excel using VBA'/><author><name>tigreconmono</name><uri>http://www.blogger.com/profile/02809806742213251218</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
