{"id":1613,"date":"2016-12-17T04:22:02","date_gmt":"2016-12-17T03:22:02","guid":{"rendered":"http:\/\/sinetiqueta.com\/wp17\/?p=1613"},"modified":"2016-12-17T04:22:02","modified_gmt":"2016-12-17T03:22:02","slug":"acces-copiar-campo-a-subformulario-y-viceversa","status":"publish","type":"post","link":"https:\/\/www.sinetiqueta.com\/?p=1613","title":{"rendered":"Acces \u2013 Copiar Campo a Subformulario y viceversa"},"content":{"rendered":"<p>Buenas\u2026<\/p>\n<p>Llevo un rato pele\u00e1ndome, pero al final\u2026 conseguido (gracias a un art\u00edculo \u00a0de 2009).<\/p>\n<p>La idea es copiar el contenido de un CAMPO de un formulario principal y pegarlo en un CAMPO de un SubFormulario.<\/p>\n<p>Para ello, hemos de copiar primero el CAMPO al portapapeles y cambiar el Focus al campo deseado en el Subformulario y pegarlo, pero antes vaciaremos el CAMPO (\u201c\u201d), por si ya tuviera alg\u00fan contenido<\/p>\n<p>Os dejo el ejemplo completo asignado a un Bot\u00f3n.<\/p>\n<pre>Private Sub Comando83_Click()\n Me.Poblaci\u00f3n.SetFocus\n DoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, , acMenuVer70\n\nDoCmd.GoToControl \"frm_visitas\"\n Forms!Entrada_Datos!frm_visitas.Form!Poblacion.SetFocus\n Poblacion = \"\"\n DoCmd.DoMenuItem acFormBar, acEditMenu, acPaste, , acMenuVer70\n\nEnd Sub<\/pre>\n<p>&nbsp;<\/p>\n<p>Con estra otra, estamos en un subformulario y queremos llevar el Focus al formulario principal, copiarlo al portapapeles y copiarlo en el SubFormulario:<\/p>\n<pre>Private Sub Comando53_Click()\nMe.Parent.Direccion.SetFocus\nDoCmd.DoMenuItem acFormBar, acEditMenu, acCopy, , acMenuVer70\n\nDoCmd.GoToControl \"frm_visitas\"\nForms!Entrada_Datos!frm_visitas.Form!Direccion.SetFocus\nDireccion = \"\"\nDoCmd.DoMenuItem acFormBar, acEditMenu, acPaste, , acMenuVer70\n\nEnd Sub<\/pre>\n<p>&nbsp;<\/p>\n<p>Saludos!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Buenas\u2026 Llevo un rato pele\u00e1ndome, pero al final\u2026 conseguido (gracias a un art\u00edculo \u00a0de 2009). La idea es copiar el contenido de un CAMPO de un formulario principal y pegarlo en un CAMPO de un SubFormulario. Para ello, hemos de&#8230; <a href=\"https:\/\/www.sinetiqueta.com\/?p=1613\" class=\"readmore\">Leer m\u00e1s<span class=\"screen-reader-text\">Acces \u2013 Copiar Campo a Subformulario y viceversa<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1648,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[226],"tags":[293,294],"class_list":["post-1613","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-access","tag-campo","tag-copiar","content-layout-excerpt-thumb"],"jetpack_featured_media_url":"https:\/\/www.sinetiqueta.com\/wp-content\/uploads\/2016\/12\/access.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=\/wp\/v2\/posts\/1613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1613"}],"version-history":[{"count":0,"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=\/wp\/v2\/posts\/1613\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=\/wp\/v2\/media\/1648"}],"wp:attachment":[{"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sinetiqueta.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}