<?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-9210947823003223456</id><updated>2011-12-17T02:51:48.272-08:00</updated><category term='Visual Studio'/><category term='Access'/><category term='Web'/><category term='Sharepoint'/><title type='text'>MS Access</title><subtitle type='html'>Everything and anything that is on Microsoft Access</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9210947823003223456.post-6849444272848510725</id><published>2011-06-16T05:00:00.000-07:00</published><updated>2011-06-16T05:01:04.287-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web'/><category scheme='http://www.blogger.com/atom/ns#' term='Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>SharePoint and Access: How do they fit together?</title><content type='html'>&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Access and SharePoint&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you’ve been working with Access for a while, it’s hard to miss the push Microsoft has been putting behind SharePoint integration with Access. The integration started as early as Access 2003, continued through 2007 and has blossomed with 2010. Without question the number one feature in the latest release is publishing your database to the web with SharePoint. In this first post I’m going to discuss what is SharePoint and why was it used to publish Access web databases, replace the Jet Replication and other integration features.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;So what is SharePoint?&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you were to go over to&amp;nbsp;&lt;a href="http://sharepoint.microsoft.com/en-us/Pages/default.aspx" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"&gt;Microsoft SharePoint page&lt;/a&gt;, you may see a long list of features and success stories described in nebulous terms. Indeed, there is no one simple definition to tack SharePoint to. Instead of discussing its capabilities, I believe we’re better off discussing the intention behind its capabilities, and I’m going to use Access as an analogy.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;SharePoint is to Web Apps as Access is to Visual Studio&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Why do we use Access instead of Visual Studio? Isn’t Visual Studio more powerful and lets us do all those cool things in code? Or better yet, why not just hire a professional to set up everything for us? The fact is, Access is accessible (excuse the pun) to *non*-programmers; people who need to track their data as part of their job and this is the crucial difference. To use Access, you’re not required to be a professional to get started, and because you can do it yourself. You don’t have to go and talk with your IT department who may be overworked with other, more important projects. Precisely because of this ability to create something on a worker’s desktop, Access is has become the most popular database in the world. Some of you may be thinking, “but there are complex Access applications that requires specialized consultants out there!” – Well, yes, but that usually comes later in the Access databases’ life and not all Access databases out there end the same way and to me that’s the beauty of Access – it enables companies to develop a line-of-business applications at far less risk, whether monetary or time &amp;amp; effort than if we opted to use Visual Studio.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;SharePoint solves a different set of problems exactly the same way as Access does: it enables *non*-web-designers to build web pages quickly and without any specialized knowledge because it’s merely a part of their workflow and not their livelihood. Likewise, it enables workers to manage files without having to think about the organization of the files, backing up the files and how they would find the files again. SharePoint helps the company saves money by reducing the overall IT administration in contrast to traditional file sharing/networked hard drives, management of documents and so forth. Some people has suggested that SharePoint be thought of as a platform providing easy-to-use building blocks, and suddenly the analogy from Access is much more accurate; we get to build web applications or develop a certain document management strategy at far less risk and expenses than if we built one from scratch.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In fact, when you examine the difference between Jet Replication and the Offline mode with SharePoint, it’s impressive in how simple it is. All you have to do is just use SharePoint as your data source and everything else about working offline and synchronizing is automatic. No manual configuration. No coding or additional installation. This truly demonstrate the raison d’être&amp;nbsp;behind Access and SharePoint; solving IT problems for common people. And that’s just one of many integration points between Access and SharePoint.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;SharePoint is not a relational database&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Access and SharePoint are very similar when we look at how they can solve business problems. Given the similarity in the audience both programs addresses, it seems conceivable that they’d be peas in pod, right? Well, here’s the other thing. Many professional Access consultants are actutely aware that SharePoint is anything but a true relational database system and they’re right. Even though SharePoint is powered by SQL Server, it introduces additional abstractions in the form of “lists” which are not similar to a SQL table and has some ramifications on how we can use lists in Access. That’ll be addressed in a future post.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;SharePoint 2010 + Access 2010 = Instant Web Database!&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The latest version of Access will allow you to publish your work to SharePoint 2010 with just one&amp;nbsp;URL&amp;nbsp;and a click. Gone are the days were you needed to upload files, configure security, configure the web server and countless other details. Granted, not all of the functionality of Access made it into this version of SharePoint’s Access Services, but we expect improved functionality in the years to come.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Sounds great! So why isn’t SharePoint used in small&amp;nbsp;businesses?&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Price is another point where SharePoint and Access diverge, SharePoint’s cost are much higher, both in terms of licensing fees and man hours required to support and maintain it. Microsoft has made some headway in this area by offering&amp;nbsp;&lt;a href="http://www.microsoft.com/en-us/office365/online-software.aspx" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"&gt;Office365&lt;/a&gt;which essentially promises to brings SharePoint functionality to small businesses. Of course, there’s also&amp;nbsp;&lt;a href="http://www.accesshosting.com/" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;"&gt;AccessHosting&lt;/a&gt;&amp;nbsp;which specializes in hosting Access web databases and we provide consultation for developmental work on web database that get hosted. This inevitable reality of moving services off the desktop and into “cloud” will also be examined in a future post.&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;My second post will discuss SharePoint lists in more detail.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9210947823003223456-6849444272848510725?l=msaccessblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/6849444272848510725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessblog.blogspot.com/2011/06/sharepoint-and-access-how-do-they-fit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/6849444272848510725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/6849444272848510725'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/2011/06/sharepoint-and-access-how-do-they-fit.html' title='SharePoint and Access: How do they fit together?'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9210947823003223456.post-2319073899109552873</id><published>2011-06-10T04:43:00.001-07:00</published><updated>2011-06-10T04:43:34.872-07:00</updated><title type='text'>Criteria for the current month in a query</title><content type='html'>&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;The other day I needed to create a query where it returns all records with dates for the current month. I did not want to hard code the beginning and ending dates in the query, so I came up with the following line of code you can paste into your query:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong style="font-style: normal; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;Between CDate(Month(Date()) &amp;amp;amp; “/1/” &amp;amp;amp; Year(Date())) And DateAdd(“m”,1,CDate(Month(Date()) &amp;amp;amp; “/1/” &amp;amp;amp; Year(Date())))-1&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;The criteria line above uses the “Between And” operators to calculate the first of the month and the end of the month of the current date. Enjoy!&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9210947823003223456-2319073899109552873?l=msaccessblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/2319073899109552873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessblog.blogspot.com/2011/06/criteria-for-current-month-in-query.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/2319073899109552873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/2319073899109552873'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/2011/06/criteria-for-current-month-in-query.html' title='Criteria for the current month in a query'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9210947823003223456.post-8980468674533609974</id><published>2011-06-10T04:42:00.000-07:00</published><updated>2011-06-10T04:42:03.198-07:00</updated><title type='text'>How to create Outlook message from Access</title><content type='html'>&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note: If you need to send out a massive amount of emails this code is not for you, instead we recommend FMS’s Total Access Emailer.&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Note 2: You must add a reference to Outlook in your Access project in order for this code to work, if you need an alternate version that does not require it then look at the next section of this post below:&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Dim objOutlook As Outlook.Application&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Dim objOutLookMsg As Outlook.MailItem&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Dim strBody as String&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;strBody = “Insert you body message here.”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set objOutlook = New Outlook.Application&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set objOutLookMsg = objOutlook.CreateItem(0)&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;With objOutLookMsg&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.To = “w@what_Ever.com”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.CC = “any@what_ever.com”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.Subject = “Enter Your Subject Here”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.Body = strBody&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.Send&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;End With&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Code without a reference to Outlook:&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Dim objOutlook As Object&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Dim objOutLookMsg As Object&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Dim strBody as String&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;strBody = “Insert you body message here.”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set objOutlook = CreateObject(“Outlook.Application”)&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Set objOutLookMsg = objOutlook.CreateItem(0)&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;With objOutLookMsg&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.To = “w@what_Ever.com”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.CC = “any@what_ever.com”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.Subject = “Enter Your Subject Here”&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.Body = strBody&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;.Send&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;End With&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9210947823003223456-8980468674533609974?l=msaccessblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/8980468674533609974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessblog.blogspot.com/2011/06/how-to-create-outlook-message-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/8980468674533609974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/8980468674533609974'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/2011/06/how-to-create-outlook-message-from.html' title='How to create Outlook message from Access'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9210947823003223456.post-2913130633773798692</id><published>2011-05-26T07:59:00.000-07:00</published><updated>2011-05-26T07:59:07.372-07:00</updated><title type='text'>Power Tip: Use the Form property when referencing subforms in your code</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Segoe UI', Tahoma, Verdana, sans-serif; font-size: 12px; line-height: 18px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2 style="color: #666666; font-size: 22px;"&gt;Form variables can make your code sizzle&lt;/h2&gt;I love using form variables. They make my code faster and easier to read, and they also provide a great way to remote control another form without being on that form or having it be the focus. Another advantage is that reading record values off a form is far quicker than using a recordset using a table off the disk. If you know the data you’re looking for is already loaded on a form, reading it by using a form variable can speed up your application.&lt;br /&gt;For example, let’s assume I’m coding in a form called frmOrders and I need to read controls on an open form called frmCustomers (you can only associate a form variable to an open form). I would use the following code to instantiate my variables:&lt;br /&gt;&lt;span style="font-family: 'Courier New';"&gt;Dim frm as Form_frmCustomers&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;Dim lngCustomerID as Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New';"&gt;If CurrentProject.AllForms("frmCustomers").IsLoaded then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;Set frm = Forms!frmCustomers&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Use the frm variable to read fields off the form&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;lngCustomerID = frm.CustomerID&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;'Use another technique to find CustomerID&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New';"&gt;End&amp;nbsp; If&lt;/span&gt;&lt;br /&gt;One of the advantages of declaring&amp;nbsp;&lt;strong&gt;frm&lt;/strong&gt;&amp;nbsp;as&amp;nbsp;&lt;strong&gt;Form_frmCustomers&lt;/strong&gt;&amp;nbsp;instead of as the generic&amp;nbsp;&lt;strong&gt;Form&lt;/strong&gt;&amp;nbsp;type is that IntelliSense will pop up to help you refer to controls on the form. You can do this with any form that's already loaded; just make sure you use "Form_" followed by the form name when declaring variables of this type.&lt;br /&gt;&lt;h2 style="color: #666666; font-size: 22px;"&gt;Subforms work too, but you need to use the Form Property&lt;/h2&gt;Subforms are considered part of the main form and lose their own identity once they are loaded. In order to reference a subform, you need to use the Form property to associate the form variable with the subform. Let's assume&amp;nbsp;&lt;strong&gt;frmOrders&lt;/strong&gt;&amp;nbsp;is the parent form and&amp;nbsp;&lt;strong&gt;frmOrderItems_sub&lt;/strong&gt;&amp;nbsp;is the name of the subform inserted into&amp;nbsp;&lt;strong&gt;frmOrders&lt;/strong&gt;. If you need to reference the subform, you could do so in the following matter:&lt;br /&gt;&lt;span style="font-family: 'Courier New';"&gt;Dim frm as Form_frmOrderItems_sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New';"&gt;Set frm = Forms!frmCustomers.frmOrderItems_sub.Form&lt;/span&gt;&lt;br /&gt;Notice the reference to the&amp;nbsp;&lt;strong&gt;.Form&lt;/strong&gt;&amp;nbsp;property at the end of&amp;nbsp; the second statement, which is needed in order to associate the subform with the variable&amp;nbsp;&lt;strong&gt;frm&lt;/strong&gt;.&lt;br /&gt;&lt;strong&gt;Note 1:&lt;/strong&gt;&amp;nbsp;You can only use form variables on forms that have modules; otherwise, the compiler will error out.&lt;br /&gt;&lt;strong&gt;Note 2:&lt;/strong&gt;&amp;nbsp;Make sure you reference the correct name of the subform on the main form or the code will not work. For example, if the subform control has a SourceObject set to a form named "frmOrderItems_sub" but has a control name of "OrderItems" on the main form, then your code should look like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', courier;"&gt;Dim frm as Form_frmOrderItems_sub&lt;/span&gt;&lt;span style="font-family: 'courier new', courier;"&gt;&lt;br /&gt;Set frm = Forms!frmCustomers.OrderItems.Form&lt;/span&gt;&lt;br /&gt;I encourage you to start using form variables in your code when you need to reference one form from another. It's another great tool in Access that will make sharing information easier across your application and can even speed it up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9210947823003223456-2913130633773798692?l=msaccessblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/2913130633773798692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessblog.blogspot.com/2011/05/power-tip-use-form-property-when.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/2913130633773798692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/2913130633773798692'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/2011/05/power-tip-use-form-property-when.html' title='Power Tip: Use the Form property when referencing subforms in your code'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9210947823003223456.post-6151793367373056355</id><published>2011-05-26T07:36:00.000-07:00</published><updated>2011-05-26T07:36:12.465-07:00</updated><title type='text'>Custom OpenForm code - Close and open your form</title><content type='html'>&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;One of the major issues with DoCmd.OpenForm is it doesn’t close the form before opening it again. This can lead to unexpected behavior of your application, so of course I created my own open form code:&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px;"&gt;&lt;pre style="background-image: url(http://accessexperts.net/blog/wp-content/themes/desk-mess-mirrored/images/pre-bg.png); border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; font-size: 14px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;span style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Public Function OpenMyForm(strForm As String, Optional DataMode As AcFormOpenDataMode, Optional WindowMode As AcWindowMode, Optional strWhere As String, Optional strOpenArgs As String) As Boolean&lt;br /&gt;   DoCmd.Close acForm, strForm&lt;br /&gt;   DoCmd.OpenForm strForm, , strWhere, strWhere, DataMode, WindowMode, strOpenArgs&lt;br /&gt;End Function&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span style="color: black; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;You will notice there are some missing arguments from my code, I just don’t use all of the arguments available to me when opening a form, (for example: the filter argument).&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9210947823003223456-6151793367373056355?l=msaccessblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/6151793367373056355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessblog.blogspot.com/2011/05/custom-openform-code-close-and-open.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/6151793367373056355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/6151793367373056355'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/2011/05/custom-openform-code-close-and-open.html' title='Custom OpenForm code - Close and open your form'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9210947823003223456.post-1085904769154680644</id><published>2011-05-26T07:34:00.000-07:00</published><updated>2011-05-26T07:34:13.290-07:00</updated><title type='text'>When to use a form’s recordset and when to use recordsetclone</title><content type='html'>&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Recordsets are an essential tool of any Access programmer, there are many types and are used in a wide range of situations, today we’re going to talk about form recordsets and provide some examples of their use.&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong style="font-style: normal; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What are Form Recordsets?&lt;/strong&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;If you’re form has a data source, either a table or query, it has a recordset property you can use in your code to get direct access to the data. When you open a recordset with the form it gains access to all of the data the form has. You can then use the recordset to find records, modify data or other uses. The only way to use them is through code and a DAO or ADODB recordset object.&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong style="font-style: normal; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Why would you use a Form Recordset?&lt;/strong&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;When the form opens and loads the data it will make a round trip to disk, why not take advantage of that trip and read it off the form using a recordset? A regular recordset makes the round trip but a form recordset reads it off the form. Any filter or sort order applied to the form would also be applied to the recordset.&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong style="font-style: normal; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Recordset Clone Example&lt;/strong&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;This kind of recordset is used when you don’t want the data on the form to change. as illustrated below:&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Let’s assume you have a field called txtFindCustomer on a form called frmCustomers that allows users to type in any characters they wish to find a customer record. On the AfterUpdate event you can place the following code:&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Private Sub txtFindCustomer_AfterUpdate()&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;1 &amp;nbsp; &amp;nbsp; Dim rst AS DAO.Recordset&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;2 &amp;nbsp; &amp;nbsp; Set rst = Me.RecordSetClone&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;3 &amp;nbsp; &amp;nbsp; rst.MoveFirst&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;4 &amp;nbsp; &amp;nbsp; rst.FindFirst “CustomerName Like ‘*” &amp;amp; txtFindCustomer &amp;amp; “*’”&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;5 &amp;nbsp; &amp;nbsp; If Not rst.EOF Then&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Me.BookMark = rst.BookMark&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;7 &amp;nbsp; &amp;nbsp; Else&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox “Could not find Customer with a name that includes ” &amp;amp; _ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;txtFindCustomer&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;10 &amp;nbsp; &amp;nbsp;End If&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;11 &amp;nbsp; &amp;nbsp;Set rst = Nothing&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;End Sub&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Notice on line 2 I use the Me equivalent of the form, I’m a big fan of Me, it allows me to copy my code to other projects with ease. As you can see, it only takes one line to open the recordset, then I move it to the first record and start my search. I finally use the bookmark property to sync the form with my search so that the user can see the record located. You will need a reference to DAO in your project in order to use the code above.&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;If you used a regular form recordset then the user would have seen the first record and then any record matching the criteria, if there were no hits they would have ended up at the end of the table. Instead, the recordsetclone will only move the form’s focus if there is a match, or leave them on their existing record if there is not.&lt;/div&gt;&lt;div style="color: #635537; font-family: 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;strong style="font-style: normal; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;SQL Server Issue&lt;/strong&gt;SQL Server tables can hold millions of records, so searching for a partial name as shown above using a recordset can take a long time or not work at all. When searching a large volume of records consider using DoCmd.FindRecord instead or another alternative.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9210947823003223456-1085904769154680644?l=msaccessblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessblog.blogspot.com/feeds/1085904769154680644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessblog.blogspot.com/2011/05/when-to-use-forms-recordset-and-when-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/1085904769154680644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9210947823003223456/posts/default/1085904769154680644'/><link rel='alternate' type='text/html' href='http://msaccessblog.blogspot.com/2011/05/when-to-use-forms-recordset-and-when-to.html' title='When to use a form’s recordset and when to use recordsetclone'/><author><name>Stu Padaso</name><uri>http://www.blogger.com/profile/17257076245343532282</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/-0-wAe-PS18s/Td5j1kqAtaI/AAAAAAAAAAg/mdBjliHYbPw/s220/211.jpg'/></author><thr:total>0</thr:total></entry></feed>
