{"id":63314,"date":"2017-10-05T12:04:32","date_gmt":"2017-10-05T12:04:32","guid":{"rendered":"http:\/\/www.accessrepairnrecovery.com\/blog\/?p=63314"},"modified":"2021-08-02T06:32:55","modified_gmt":"2021-08-02T06:32:55","slug":"microsoft-access-vba-code","status":"publish","type":"post","link":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code","title":{"rendered":"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!"},"content":{"rendered":"<div class=\"8e1a49907eb0ebe2b39ac6355e555698\" data-index=\"1\" style=\"float: none; margin:0px 0 0px 0; text-align:center;\">\n<style>\r\n.leaderboard { width: 320px; height: 100px; }\r\n@media(min-width: 500px) { .leaderboard { width: 468px; height: 60px; } }\r\n@media(min-width: 800px) { .leaderboard { width: 728px; height: 90px; } }\r\n<\/style>\r\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8329139124199643\" crossorigin=\"anonymous\"><\/script>\r\n<ins class=\"adsbygoogle leaderboard\"\r\n     style=\"display:inline-block\"\r\n\t data-full-width-responsive=\"true\"\r\n     data-ad-client=\"ca-pub-8329139124199643\"\r\n     data-ad-slot=\"1972481166\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<blockquote>\n<p style=\"text-align: justify;\"><strong><em><span style=\"color: #000000;\">Summary:<\/span><\/em><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><em><span style=\"color: #000000;\">This tutorial helps orient you to the programming tools i.e, VBA code in Microsoft Access and point you to some resources where you can learn more about programming.<\/span><\/em><\/strong><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">You must have used Access macros and very well know how much complex it is to work with.\u2026..<em>isn\u2019t it<\/em>? But do you know you can simplify this complexity just by making use of VBA codes in Access.<\/span><!--more--><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"> Now you will ask what this VBA code is and how to use it? Well to get answers of such questions you just need to get stick to this post and get the complete info and simplify your working style in MS Access.<\/span><\/p>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\">Introduction To Access VBA<\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">VBA is a programming language that you can use to create powerful application in Access. VBA includes numerous of commands that allows you to perform much complex operations that is quiet tougher to do by using the Access macros.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Not only this, you can extend the power of VBA by using the third party controls and writing your own functions\/ procedures for own specific needs. You can also use the VBA code to integrate your access with other programs too.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong><a href=\"https:\/\/support.office.com\/en-us\/article\/Get-started-with-Access-programming-92EB616B-3204-4121-9277-70649E33BE4F\">Programming Microsoft Access with VBA <\/a><\/strong>can be a lot easier if you know the keyboard shortcuts for the most common commands and the most common bits of code that you will use in the editor after then debug your Access application.<\/span><\/p>\n<div style='margin: 8px 0; clear: both;'><div style='border: 1px solid #e7e7e7; border-radius: 3px; background: #ffffff; color: #000; margin-top: 30px;'><div style='display: inline; background: #fff; padding: 10px; border: 1px solid #e7e7e7; border-bottom-right-radius: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; margin-left: -1px;'><img src='https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2021\/12\/y-bulb.png' alt='tip' style='vertical-align: middle;' width='30px'><strong style='font-size: 18px; vertical-align: middle;'> Still having issues?<\/strong> Fix them with this Access repair tool: <\/div><div style='padding: 1rem; line-height: 1.6;'><p style='margin: 0; font-size: 17px;'>This software repairs & restores all ACCDB\/MDB objects including tables, reports, queries, records, forms, and indexes along with modules, macros, and other stuffs effectively.<\/p><div><ol style='font-size: 17px;'><li><strong><a href='https:\/\/www.accessrepairnrecovery.com\/blog\/get-access-file-repair-tool' target='_blank'>Download Stellar Repair for Access <\/a><\/strong> rated <i>Great<\/i> on Cnet (<i>download starts on this page<\/i>).<\/li><li>Click <strong>Browse<\/strong> and <strong>Search<\/strong> option to locate corrupt Access database.<\/li><li>Click <strong>Repair<\/strong> button to repair & preview the database objects.<\/li><\/ol><\/div><\/div><\/div><\/div>\n<h1 style=\"text-align: justify;\"><span style=\"color: #000000;\">How To Activate The Built-In VBA Functions in Access<\/span><\/h1>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Do you know you can activate the built in VBA functions in your Access 2013\/2016 application. \u00a0Wants to know how then follow these step by step instructions.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">In order to use the built in VBA functions in your access\u00a0 data base , you will need to turn on the visual basic reference called &#8220;Visual Basic For Applications&#8221;.<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"color: #000000;\">For this, you just need to open the database. Press\u00a0Alt+F11 to open the\u00a0<em>Microsoft Visual Basic<\/em> \u00a0When the <em><strong>Microsoft Visual Basic <\/strong><\/em><strong>window<\/strong> appears, select <strong>References <\/strong>under the <strong>Tools <\/strong>menu.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-63318\" src=\"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/vba_reference1.gif\" alt=\"\" width=\"618\" height=\"461\" \/><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"color: #000000;\">When the <em>References<\/em>window appears, look for the reference called\u00a0<strong>Visual Basic for Applications<\/strong>\u00a0and make sure that it is checked.<\/span><\/li>\n<li><span style=\"color: #000000;\">After then click on the OK button.<\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-63317\" src=\"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/vba_reference2.gif\" alt=\"\" width=\"459\" height=\"370\" \/><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"color: #000000;\">Now your access database is able to use the built-in VBA functions.<\/span><\/li>\n<\/ul>\n<h3 style=\"text-align: center;\"><span style=\"text-decoration: underline;\"><span style=\"color: #000080;\"><strong>Common Access VBA Programming And Debugging Code<\/strong><\/span><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Here is the list of common VBA code that helps you in performing VBA task completed, so keep it handy.<\/span><\/p>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">To Open A Form In Form View:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">DoCmd.OpenForm &#8220;<em>formname<\/em>&#8220;,acNormal<\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">To Make Changes To The Form Property On An Open Form:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Forms![<em>formName<\/em>].<em>propertyName<\/em> = <em>newValue<\/em><\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">Get value from a control on an open form:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Forms![<em>formName<\/em>]![<em>controlName<\/em>].Value<\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">Change value of a control on an open form:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Forms![<em>formName<\/em>]![<em>controlName<\/em>].Value = <em>newValue<\/em><\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">Change a control property on an open form:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Forms![<em>formName<\/em>]![<em>controlName<\/em>].<em>propertyName<\/em> = <em>newValue<\/em><\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">Close a form, saving changes:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">DoCmd.Close acForm, &#8220;<em>formName<\/em>&#8220;, acSaveYes<\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">Print a report:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">DoCmd.OpenReport &#8220;<em>reportName<\/em>&#8220;, acViewNormal<\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">Run an action query:<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">DoCmd.RunSQL &#8220;<em>SQLstatement<\/em>&#8220;<\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">To display a simple message<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">MsgBox &#8220;<em>yourMessage<\/em>&#8220;<\/span><\/p>\n<\/blockquote>\n<p style=\"text-align: justify;\"><strong><span style=\"color: #000000;\">To ask yes\/no question onscreen.<\/span><\/strong><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><em>variable <\/em>= MsgBox(&#8220;<em>yourMessage<\/em>&#8220;, vbQuestion + vbYesNo)<\/span><\/p>\n<p>ALSO READ:<\/p>\n<p><strong><a class=\"row-title\" href=\"https:\/\/www.accessrepairnrecovery.com\/blog\/fixes-for-access-reserved-error\" aria-label=\"\u201cHow To Fix MS Access Reserved Error 7713, 7748, 7711 In Access 2016\/ 2013\/2010\/2007\u201d (Edit)\">How To Fix MS Access Reserved Error 7713, 7748, 7711 In Access 2016\/ 2013\/2010\/2007<\/a><\/strong><\/p><\/blockquote>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\">Navigating And Selecting Code In Vba<\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">You can use theses VBA shortcuts in the code window and the immediate window (that let you run code any time, right on the spot) to simplify your working style.<\/span><\/p>\n<table width=\"419\">\n<tbody>\n<tr>\n<td><span style=\"color: #000000;\"><strong>Action<\/strong><\/span><\/td>\n<td><span style=\"color: #000000;\"><strong>Shortcut Key<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor right one character<\/span><\/td>\n<td><span style=\"color: #000000;\">\u2192<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select character to right<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+\u2192<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor right one word<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+\u2192<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select to end of word<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+ Shift+\u2192<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor left one character<\/span><\/td>\n<td><span style=\"color: #000000;\">\u2190<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select character to left of cursor<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+\u2190<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor left one word<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+\u2190<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor to start of line<\/span><\/td>\n<td><span style=\"color: #000000;\">Home<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select text to start of line<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+Home<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor to end of line<\/span><\/td>\n<td><span style=\"color: #000000;\">End<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select text to end of line<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+End<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor up a line<\/span><\/td>\n<td><span style=\"color: #000000;\">\u2191<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor down a line<\/span><\/td>\n<td><span style=\"color: #000000;\">\u2193<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor to next procedure<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+\u2193<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Move cursor to previous procedure<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+\u2191<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Scroll up one screen<\/span><\/td>\n<td><span style=\"color: #000000;\">PgUp<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Scroll down one screen<\/span><\/td>\n<td><span style=\"color: #000000;\">PgDn<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Go to top of module<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Home<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select all text to top of module<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+ Shift+Home<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Go to bottom of module<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+End<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Select all text to bottom of module<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+ Shift+End<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Cut selection<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+X<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Copy selection<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+C<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Paste selection<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+V<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Cut current line to Clipboard<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Y<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Delete to end of word<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Delete<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Delete character or selected text<\/span><\/td>\n<td><span style=\"color: #000000;\">Delete (Del)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Delete character to left of cursor<\/span><\/td>\n<td><span style=\"color: #000000;\">Backspace<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Delete to end of word<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Delete<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Delete to beginning of word<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Backspace<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Undo<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Z<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Indent line<\/span><\/td>\n<td><span style=\"color: #000000;\">Tab<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Outdent line<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+Tab<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Find<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+F<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Replace<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+H<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Find Next<\/span><\/td>\n<td><span style=\"color: #000000;\">F3<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Find Previous<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+F3<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Get help with currently selected word<\/span><\/td>\n<td><span style=\"color: #000000;\">F1<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Quick Info<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+I<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\">General VBA Editor Shortcut Keys<\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">The following table will give you the knowledge of the shortcut keys and their functions available throughout the Visual Basic editor, where you will write , modify and run your VBA code.<\/span><\/p>\n<table width=\"419\">\n<tbody>\n<tr>\n<td><span style=\"color: #000000;\"><strong>Action<\/strong><\/span><\/td>\n<td><span style=\"color: #000000;\"><strong>Shortcut Key<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Switch between Access and the VBA editor<\/span><\/td>\n<td><span style=\"color: #000000;\">Alt+F11<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Help<\/span><\/td>\n<td><span style=\"color: #000000;\">F1<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">View Object Browser<\/span><\/td>\n<td><span style=\"color: #000000;\">F2<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">View properties\/events<\/span><\/td>\n<td><span style=\"color: #000000;\">F4<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">View Code window<\/span><\/td>\n<td><span style=\"color: #000000;\">F7<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">View Immediate window<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+G<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">View shortcut menu<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+F10 (or right-click)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Run a Sub\/UserForm<\/span><\/td>\n<td><span style=\"color: #000000;\">F5<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Stop code execution<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Break<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Close VBA Editor and return to Access<\/span><\/td>\n<td><span style=\"color: #000000;\">Alt+Q<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\">VBA Debugging Shortcut Keys<\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Code in programming language has to be written exactly, there can be no errors or bugs. If there is any error or bugs then it will show compiling issue. Fortunately, you can debug code in VBA quickly with these debugging shortcuts.<\/span><\/p>\n<table width=\"419\">\n<tbody>\n<tr>\n<td><span style=\"color: #000000;\"><strong>Action<\/strong><\/span><\/td>\n<td><span style=\"color: #000000;\"><strong>Shortcut Key<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Toggle breakpoint<\/span><\/td>\n<td><span style=\"color: #000000;\">F9<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Step into<\/span><\/td>\n<td><span style=\"color: #000000;\">F8<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Step over<\/span><\/td>\n<td><span style=\"color: #000000;\">Shift+F8<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Step out<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+Shift+F8<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Run to cursor<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+F8<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"color: #000000;\">Clear all breakpoints<\/span><\/td>\n<td><span style=\"color: #000000;\">Ctrl+F9<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline; color: #000080;\">Important Access VBA Code Along with the Examples<\/span><\/h2>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong><u>ChangeLinkPath<\/u><\/strong><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">This function is mainly used to change the old path for the linked tables to a new path. The function does this by dropping the linked tables and then relinking it to the same table in the database specified in the new path.<\/span><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><em><span style=\"color: #000000;\">Public Function ChangeLinkPath(strNewPath As String) As String\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> Dim dbs As DAO.Database\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Dim strTblName As String\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Dim colTbl As Collection\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Dim intTbl As Integer\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> If strNewPath &lt;&gt; &#8220;&#8221; And Dir(strNewPath) &lt;&gt; &#8220;&#8221; Then<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Set colTbl = New Collection\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Set dbs = CurrentDb\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 For intTbl = dbs.TableDefs.Count &#8211; 1 To 0 Step -1\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 If dbs.TableDefs(intTbl).Connect &lt;&gt; &#8220;&#8221; And _\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Not dbs.TableDefs(intTbl).Connect Like &#8220;*&#8221; &amp; strNewPath Then\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 colTbl.Add dbs.TableDefs(intTbl).Name\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dbs.TableDefs.Delete dbs.TableDefs(intTbl).Name\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 End If\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Next intTbl\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 For intTbl = colTbl.Count To 1 Step -1\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 strTblName = colTbl(intTbl)\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DoCmd.TransferDatabase acLink, &#8220;Microsoft Access&#8221;, _\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 strNewPath, acTable, strTblName, strTblName\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Debug.Print &#8220;connection made to &#8216;&#8221; &amp; strTblName &amp; &#8220;&#8216;&#8221;\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Next intTbl\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Set dbs = Nothing\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Set colTbl = Nothing\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Debug.Print &#8220;DONE!&#8221;\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 ChangeLinkPath = &#8220;DONE!&#8221;\u00a0<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> Else<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Debug.Print &#8220;New path not provided. No changes made!&#8221;<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 ChangeLinkPath = &#8220;New path not provided. No changes made!&#8221;<\/span><\/em><\/p>\n<p style=\"text-align: justify;\"><em><span style=\"color: #000000;\">End If<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> Exit Function\u00a0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> End Function<\/span><\/em><\/p><\/blockquote>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong>ImportExportSpecification<\/strong><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">This section of the Access VBA contains documentation for all the objects, properties, methods, and events contained in the access object model.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong>ImportExportSpecification<\/strong>\u00a0object contain all the information that access needs to repeat an import\/export operation without providing any input.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">You have to Use the\u00a0<strong>Add<\/strong>\u00a0method of the\u00a0<strong>ImportExportSpecifications<\/strong>\u00a0collection to create a new\u00a0<strong>ImportExportSpecification<\/strong>\u00a0object. Use the <strong>Execute<\/strong>\u00a0method to run saved import or export operation.<\/span><\/p>\n<blockquote><p>ALSO READ:<\/p>\n<p><strong><a class=\"row-title\" href=\"https:\/\/www.accessrepairnrecovery.com\/blog\/fixes-to-resolve-access-database-inconsistent-state-error\" aria-label=\"\u201c5 Fixes To Repair Access Database That Is In An Inconsistent State\u201d (Edit)\">5 Fixes To Repair Access Database That Is In An Inconsistent State<\/a><\/strong><\/p><\/blockquote>\n<h3 style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong><u>ConcatenateFieldValues<\/u><\/strong><\/span><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Well this function is based on a function name concatenate. It is used to create a concatenated string from a single field&#8217;s values from the entire records desired to be included in the concatenated string.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">The records to be included, plus the field to be used for creating the concatenated string, are given by the SQL statement that is passed to the function.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Passed SQL statement must return only one field in order for this function to work correctly. The value in the concatenated string is given by the string that is provided to the function as a delimiter string.<\/span><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><em><span style=\"color: #000000;\">Public Function ConcatenateFieldValues(pstrSQL As String, _<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Optional pstrDelim As String = &#8220;, &#8220;) As String<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> Dim strConcat As String<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> &#8216;======For ADO comment next 2 lines and =======<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> &#8216;====== uncomment out ADO lines below =======<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Dim db As DAO.Database<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Dim rs As DAO.Recordset<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">On Error Resume Next<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">strConcat = &#8220;&#8221;<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">&#8216;======For ADO comment out next 2 DAO lines and =======<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> &#8216;====== uncomment ADO lines below =======<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Set db = CurrentDb<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Set rs = db.OpenRecordset(pstrSQL)<\/span><\/em><\/p>\n<p><em><span style=\"color: #000000;\"> &#8216;======For ADO uncomment next two lines and =====<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> &#8216;====== comment out DAO lines above and below ======<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> &#8216; Dim rs As New ADODB.Recordset<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> &#8216; rs.Open pstrSQL, CurrentProject.Connection, _<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> &#8216;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 adOpenKeyset, adLockOptimistic<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">With rs<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 If Not .EOF Then<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .MoveFirst<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Do While Not .EOF<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 strConcat = strConcat &amp; .Fields(0) &amp; pstrDelim<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 .MoveNext<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Loop<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 End If<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 .Close<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> End With<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">Set rs = Nothing<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">&#8216;====== Comment next 2 lines for ADO ========<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> db.Close<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> Set db = Nothing<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">If Len(strConcat) &gt; 0 Then strConcat = _<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> \u00a0\u00a0\u00a0\u00a0\u00a0 Left(strConcat, Len(strConcat) &#8211; Len(pstrDelim))<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">ConcatenateFieldValues = strConcat<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">Exit Function<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> End Function<\/span><\/em><\/p><\/blockquote>\n<h3 style=\"text-align: justify;\"><strong><em>DeleteAllRelationships()<\/em><\/strong><\/h3>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><strong><em>DeleteAllRelationships()<\/em><\/strong> function<em>\u00a0<\/em>code is basically used to <strong>delete all relationships<\/strong> in the current database.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">In some circumstances, access database fails to display relations between tables in the relationship window. Since you could not view the relationship nor you\u00a0 could not delete them, which will take your database to an inconsistent state. So for such cases , this code is provided as a fix.<\/span><\/p>\n<blockquote><p><span style=\"color: #000000;\"><em>Function DeleteAllRelationships() As String<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em>&#8216; WARNING: Deletes all relationships in the current database.<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Dim db As Database &#8216; Current DB<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Dim rex As Relations &#8216; Relations of currentDB.<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Dim rel As Relation &#8216; Relationship being deleted.<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Dim iKt As Integer &#8216; Count of relations deleted.<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Dim sMsg As String &#8216; MsgBox string.<\/em><\/span><\/p>\n<p><span style=\"color: #000000;\"><em>sMsg = &#8220;About to delete ALL relationships between tables in the current database.&#8221; &amp; vbCrLf &amp; &#8220;Continue?&#8221;<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> If MsgBox(sMsg, vbQuestion + vbYesNo + vbDefaultButton2, &#8220;Are you sure?&#8221;) = vbNo Then<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> DeleteAllRelationships = &#8220;Operation cancelled&#8221;<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Exit Function<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> End If<\/em><\/span><\/p>\n<p><span style=\"color: #000000;\"><em>Set db = CurrentDb()<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Set rex = db.Relations<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> iKt = rex.Count<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Do While rex.Count &gt; 0<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Debug.Print rex(0).Name<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> rex.Delete rex(0).Name<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> Loop<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em> DeleteAllRelationships = iKt &amp; &#8221; relationship(s) deleted&#8221;<\/em><\/span><br \/>\n<span style=\"color: #000000;\"><em>End Function<\/em><\/span><\/p><\/blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\">Just copy and paste this function into a module. Press Ctrl+G to open the Immediate Window. Enter:<\/span><\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><span style=\"color: #000000;\"><em>? DeleteAllRelationships()<\/em><\/span><\/p>\n<\/blockquote>\n<h3 style=\"text-align: justify;\">Conclusion:<\/h3>\n<p style=\"text-align: justify;\">Hopefully, you all must have grabbed much knowledge on Access VBA code. EXPLORE YOUR IDEAS ON PROGRAMMING WITH ACCESS&#8230;.!<\/p>\n<div style='margin: 8px 0; clear: both;'><div style='border: 1px solid #e7e7e7; border-radius: 3px; background: #ffffff; color: #000; margin-top: 30px;'><div style='display: inline; background: #fff; padding: 10px; border: 1px solid #e7e7e7; border-bottom-right-radius: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; margin-left: -1px;'><img src='https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2021\/12\/y-bulb.png' alt='tip' style='vertical-align: middle;' width='30px'><strong style='font-size: 18px; vertical-align: middle;'> Still having issues?<\/strong> Fix them with this Access repair tool: <\/div><div style='padding: 1rem; line-height: 1.6;'><p style='margin: 0; font-size: 17px;'>This software repairs & restores all ACCDB\/MDB objects including tables, reports, queries, records, forms, and indexes along with modules, macros, and other stuffs effectively.<\/p><div><ol style='font-size: 17px;'><li><strong><a href='https:\/\/www.accessrepairnrecovery.com\/blog\/get-access-file-repair-tool' target='_blank'>Download Stellar Repair for Access <\/a><\/strong> rated <i>Great<\/i> on Cnet (<i>download starts on this page<\/i>).<\/li><li>Click <strong>Browse<\/strong> and <strong>Search<\/strong> option to locate corrupt Access database.<\/li><li>Click <strong>Repair<\/strong> button to repair & preview the database objects.<\/li><\/ol><\/div><\/div><\/div><\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Summary: This tutorial helps orient you to the programming tools i.e, VBA code in Microsoft Access and point you to &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!\" class=\"read-more button\" href=\"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#more-63314\" aria-label=\"Read more about Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":63321,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[496,495,493,494,497],"class_list":["post-63314","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-access-vba-code","tag-access-vba-code-with-example","tag-access-vba-programming-code","tag-microsoft-access-vba-code","tag-ms-access-functions","resize-featured-image"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!\" \/>\n<meta property=\"og:description\" content=\"Summary: This tutorial helps orient you to the programming tools i.e, VBA code in Microsoft Access and point you to ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code\" \/>\n<meta property=\"og:site_name\" content=\"MS Access Repair And Recovery Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-05T12:04:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-02T06:32:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/ACCESS.png\" \/>\n\t<meta property=\"og:image:width\" content=\"777\" \/>\n\t<meta property=\"og:image:height\" content=\"520\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pearson Willey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pearson Willey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code\"},\"author\":{\"name\":\"Pearson Willey\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#\\\/schema\\\/person\\\/9e865a2660c466b5b9c3a485e05f8ecb\"},\"headline\":\"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!\",\"datePublished\":\"2017-10-05T12:04:32+00:00\",\"dateModified\":\"2021-08-02T06:32:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code\"},\"wordCount\":1707,\"publisher\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/ACCESS.png\",\"keywords\":[\"Access VBA Code\",\"Access VBA Code with example\",\"Access VBA Programming code\",\"Microsoft Access VBA Code\",\"ms Access functions\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code\",\"url\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code\",\"name\":\"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/ACCESS.png\",\"datePublished\":\"2017-10-05T12:04:32+00:00\",\"dateModified\":\"2021-08-02T06:32:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#primaryimage\",\"url\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/ACCESS.png\",\"contentUrl\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/10\\\/ACCESS.png\",\"width\":777,\"height\":520,\"caption\":\"ACCESS VBA CODE\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/microsoft-access-vba-code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/\",\"name\":\"MS Access Repair And Recovery Blog\",\"description\":\"Your One Stop Destination for MS Access Fixes, Tutorials &amp; More\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#organization\",\"name\":\"MS Access Repair And Recovery Blog\",\"url\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/accessrepairnrecovery-com-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/07\\\/accessrepairnrecovery-com-logo.png\",\"width\":350,\"height\":70,\"caption\":\"MS Access Repair And Recovery Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/#\\\/schema\\\/person\\\/9e865a2660c466b5b9c3a485e05f8ecb\",\"name\":\"Pearson Willey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1e14359741626aa0b5f1415dc1929323c9923a9826470b578bddbc2a39751640?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1e14359741626aa0b5f1415dc1929323c9923a9826470b578bddbc2a39751640?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/1e14359741626aa0b5f1415dc1929323c9923a9826470b578bddbc2a39751640?s=96&d=mm&r=g\",\"caption\":\"Pearson Willey\"},\"description\":\"Pearson Willey is a website content writer and long-form content planner. Besides this, he is also an avid reader. Thus he knows very well how to write an engaging content for readers. Writing is like a growing edge for him. He loves exploring his knowledge on MS Access &amp; sharing tech blogs.\",\"url\":\"https:\\\/\\\/www.accessrepairnrecovery.com\\\/blog\\\/author\\\/pearson-willey\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code","og_locale":"en_US","og_type":"article","og_title":"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!","og_description":"Summary: This tutorial helps orient you to the programming tools i.e, VBA code in Microsoft Access and point you to ... Read more","og_url":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code","og_site_name":"MS Access Repair And Recovery Blog","article_published_time":"2017-10-05T12:04:32+00:00","article_modified_time":"2021-08-02T06:32:55+00:00","og_image":[{"width":777,"height":520,"url":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/ACCESS.png","type":"image\/png"}],"author":"Pearson Willey","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pearson Willey","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#article","isPartOf":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code"},"author":{"name":"Pearson Willey","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#\/schema\/person\/9e865a2660c466b5b9c3a485e05f8ecb"},"headline":"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!","datePublished":"2017-10-05T12:04:32+00:00","dateModified":"2021-08-02T06:32:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code"},"wordCount":1707,"publisher":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#primaryimage"},"thumbnailUrl":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/ACCESS.png","keywords":["Access VBA Code","Access VBA Code with example","Access VBA Programming code","Microsoft Access VBA Code","ms Access functions"],"articleSection":["Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code","url":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code","name":"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!","isPartOf":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#primaryimage"},"image":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#primaryimage"},"thumbnailUrl":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/ACCESS.png","datePublished":"2017-10-05T12:04:32+00:00","dateModified":"2021-08-02T06:32:55+00:00","breadcrumb":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#primaryimage","url":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/ACCESS.png","contentUrl":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2017\/10\/ACCESS.png","width":777,"height":520,"caption":"ACCESS VBA CODE"},{"@type":"BreadcrumbList","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/microsoft-access-vba-code#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.accessrepairnrecovery.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Learn All About Microsoft Access VBA Code \u2013 VBA Functions, Shortcuts And Much More\u2026!"}]},{"@type":"WebSite","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#website","url":"https:\/\/www.accessrepairnrecovery.com\/blog\/","name":"MS Access Repair And Recovery Blog","description":"Your One Stop Destination for MS Access Fixes, Tutorials &amp; More","publisher":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.accessrepairnrecovery.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#organization","name":"MS Access Repair And Recovery Blog","url":"https:\/\/www.accessrepairnrecovery.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2021\/07\/accessrepairnrecovery-com-logo.png","contentUrl":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-content\/uploads\/2021\/07\/accessrepairnrecovery-com-logo.png","width":350,"height":70,"caption":"MS Access Repair And Recovery Blog"},"image":{"@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.accessrepairnrecovery.com\/blog\/#\/schema\/person\/9e865a2660c466b5b9c3a485e05f8ecb","name":"Pearson Willey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1e14359741626aa0b5f1415dc1929323c9923a9826470b578bddbc2a39751640?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1e14359741626aa0b5f1415dc1929323c9923a9826470b578bddbc2a39751640?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1e14359741626aa0b5f1415dc1929323c9923a9826470b578bddbc2a39751640?s=96&d=mm&r=g","caption":"Pearson Willey"},"description":"Pearson Willey is a website content writer and long-form content planner. Besides this, he is also an avid reader. Thus he knows very well how to write an engaging content for readers. Writing is like a growing edge for him. He loves exploring his knowledge on MS Access &amp; sharing tech blogs.","url":"https:\/\/www.accessrepairnrecovery.com\/blog\/author\/pearson-willey"}]}},"_links":{"self":[{"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/posts\/63314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/comments?post=63314"}],"version-history":[{"count":0,"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/posts\/63314\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/media\/63321"}],"wp:attachment":[{"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/media?parent=63314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/categories?post=63314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.accessrepairnrecovery.com\/blog\/wp-json\/wp\/v2\/tags?post=63314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}