{"id":104,"date":"2013-10-07T21:36:48","date_gmt":"2013-10-08T01:36:48","guid":{"rendered":"http:\/\/access-diva.com\/blog\/?p=104"},"modified":"2018-07-04T19:37:47","modified_gmt":"2018-07-04T23:37:47","slug":"hyperlink-to-open-forms","status":"publish","type":"post","link":"https:\/\/access-diva.com\/blog\/?p=104","title":{"rendered":"Hyperlink to open Forms"},"content":{"rendered":"<p>You&#8217;re using a Continuous Form,\u00a0you can&#8217;t fit all your fields on the Form but you need to see and\/or edit the record and you don&#8217;t want to use a Command Button.\u00a0 <span style=\"color: #333333;\">(Sample file located at the bottom of the article.)\u00a0<\/span> Here&#8217;s an alternate way to open the record with a Field&#8230;<\/p>\n<div id=\"attachment_110\" style=\"width: 333px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-110\" class=\"wp-image-110 size-full\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientList.png\" alt=\"Client List\" width=\"323\" height=\"278\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientList.png 323w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientList-300x258.png 300w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientList-150x129.png 150w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><p id=\"caption-attachment-110\" class=\"wp-caption-text\">Client List<\/p><\/div>\n<p>a. Put an UNBOUND field on your Form and enter the below as the Control Source (Figure 1). \u00a0Note, where <strong>cpClientID<\/strong>\u00a0is my Autonumber\u00a0and Primary Key\u00a0you should replace with your Autonumber and\/or Primary Key&#8230;<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n=IIf(IsNull(&#x5B;cpClientID]),&quot;(New)&quot;,&quot;Open&quot;)\r\n<\/pre>\n<div id=\"attachment_107\" style=\"width: 467px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-107\" class=\"wp-image-107 size-full\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewDesign.png\" alt=\"Open New\" width=\"457\" height=\"539\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewDesign.png 457w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewDesign-254x300.png 254w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewDesign-127x150.png 127w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewDesign-400x471.png 400w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><p id=\"caption-attachment-107\" class=\"wp-caption-text\">Figure 1<\/p><\/div>\n<p>b.\u00a0 In the <strong>Properties Sheet<\/strong> window for your Field set the <strong>Display As Hyperlink<\/strong> to <strong>Always<\/strong>.\u00a0 Note, you can leave the <strong>Font Color<\/strong> as <strong>H<strong>yp<\/strong>erlink Color<\/strong> or change to any color you like.\u00a0 However, since most Users are accustomed to the blue it is safer to accept the default <strong>Font Color<\/strong> of <strong>Hyperlink Color<\/strong>.<\/p>\n<div id=\"attachment_108\" style=\"width: 441px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-108\" class=\"wp-image-108 size-full\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewHyperlink.png\" alt=\"Figure 2\" width=\"431\" height=\"302\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewHyperlink.png 431w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewHyperlink-300x210.png 300w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewHyperlink-150x105.png 150w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewHyperlink-400x280.png 400w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><p id=\"caption-attachment-108\" class=\"wp-caption-text\">Figure 2<\/p><\/div>\n<p>c.\u00a0 Now, just add a bit of code the On_Click event to open your details form (See sample of my frmClientProfile below)&#8230;<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nIf (IsNull(txtClientID)) Then\r\n    'If the Field displays (New)\r\n    DoCmd.OpenForm &quot;frmClientProfile&quot;, , , ,acFormAdd\r\nElse\r\n    'If the\u00a0Field displays Open\r\n    DoCmd.OpenForm &quot;frmClientProfile&quot;, , ,&quot;&#x5B;cpClientID]=&quot; &amp; Me!&#x5B;txtClientID]\r\nEnd If\r\n<\/pre>\n<div id=\"attachment_112\" style=\"width: 460px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-112\" class=\"wp-image-112 size-full\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfileNew.png\" alt=\"frmClientProfile ~ New Record\" width=\"450\" height=\"443\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfileNew.png 450w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfileNew-300x295.png 300w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfileNew-150x147.png 150w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfileNew-400x393.png 400w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><p id=\"caption-attachment-112\" class=\"wp-caption-text\">frmClientProfile ~ New Record<\/p><\/div>\n<div id=\"attachment_113\" style=\"width: 460px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-113\" class=\"wp-image-113 size-full\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfile.png\" alt=\"frmClientProfile ~ Existing\" width=\"450\" height=\"443\" srcset=\"https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfile.png 450w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfile-300x295.png 300w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfile-150x147.png 150w, https:\/\/access-diva.com\/blog\/wp-content\/uploads\/2013\/09\/OpenNewClientProfile-400x393.png 400w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><p id=\"caption-attachment-113\" class=\"wp-caption-text\">frmClientProfile ~ Existing<\/p><\/div>\n<p>To download a sample file click <a href=\"https:\/\/www.access-diva.com\/myzipfiles\/OpenNewDemo.zip\">here<\/a>&#8230;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_104\" class=\"pvc_stats all  \" data-element-id=\"104\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;re using a Continuous Form, you can&#8217;t fit all your fields on the Form but you need to see and\/or edit the record and you don&#8217;t want to use a Command Button. (Sample file located at the bottom of the article.) Here&#8217;s an alternate way to open the record with a Field&#8230;<\/p>\n<p id=\"caption-attachment-110\" class=\"wp-caption-text\">Client [&#8230;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_104\" class=\"pvc_stats all  \" data-element-id=\"104\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/access-diva.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74,71,44],"tags":[20,58],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-controls","category-forms","category-text-boxes","tag-forms","tag-hyperlink","odd"],"_links":{"self":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":12,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/access-diva.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}