John I used the control name "Whom" which is combo box it did not worked and then control "Medical" that is plain Text box and in both cases I received an error message access can not move focus to control Whom and then Medical
Kambiz
--------------------------------------------
On Thu, 11/27/14, John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Subject: Re: [MS_AccessPros] Help with VBA
To: MS_Access_Professionals@yahoogroups.com
Date: Thursday, November 27, 2014, 3:55 PM
Kambiz-
What is the name of the control that is bound to the field
CERTAIN? That's what you should use.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
On Nov 27, 2014, at 8:47 PM, Kambiz Afshartous
kenaf42@yahoo.com [MS_Access_Professionals]
<MS_Access_Professionals@yahoogroups.com> wrote:
Thank you John,
First and second line of code works perfectly but third line
triggers error 2110 run time "access can not move focus
to control CERTAIN"
Kambiz
--------------------------------------------
On Wed, 11/26/14, John Viescas JohnV@msn.com
[MS_Access_Professionals]
<MS_Access_Professionals@yahoogroups.com> wrote:
Subject: Re: [MS_AccessPros] Help with VBA
To: MS_Access_Professionals@yahoogroups.com
Date: Wednesday, November 26, 2014, 3:38 PM
Private Sub Form_Close() ' Open the other
form
DoCmd.OpenForm "B" ' Put focus on form
to
force it to finish opening Forms!B.SetFocus ' Put
focus on CERTAIN
control
Forms!B!CERTAIN.SetFocusEnd Sub
No need to do the SetFocus on the
second form if the control you want to have the focus is
the
first in the tab order on that form.
John Viescas,
AuthorMicrosoft Access 2010 Inside
OutMicrosoft Access 2007 Inside
OutMicrosoft Access 2003 Inside
OutBuilding Microsoft Access
Applications SQL Queries for Mere
Mortals http://www.viescas.com/ (Paris,
France)
On Nov 26, 2014, at 7:29 PM, kenaf42@yahoo.com
[MS_Access_Professionals]
<MS_Access_Professionals@yahoogroups.com>
wrote:
I need a code for OnClose event of form "A", to
open form "B" and set focus on CERTAIN field in
form "B"
#yiv5612097998 #yiv5612097998 --
#yiv5612097998ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}
#yiv5612097998 #yiv5612097998ygrp-mkp hr {
border:1px solid #d8d8d8;}
#yiv5612097998 #yiv5612097998ygrp-mkp #yiv5612097998hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}
#yiv5612097998 #yiv5612097998ygrp-mkp #yiv5612097998ads {
margin-bottom:10px;}
#yiv5612097998 #yiv5612097998ygrp-mkp .yiv5612097998ad {
padding:0 0;}
#yiv5612097998 #yiv5612097998ygrp-mkp .yiv5612097998ad p
{
margin:0;}
#yiv5612097998 #yiv5612097998ygrp-mkp .yiv5612097998ad a
{
color:#0000ff;text-decoration:none;}
#yiv5612097998 #yiv5612097998ygrp-sponsor
#yiv5612097998ygrp-lc {
font-family:Arial;}
#yiv5612097998 #yiv5612097998ygrp-sponsor
#yiv5612097998ygrp-lc #yiv5612097998hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}
#yiv5612097998 #yiv5612097998ygrp-sponsor
#yiv5612097998ygrp-lc .yiv5612097998ad {
margin-bottom:10px;padding:0 0;}
#yiv5612097998 #yiv5612097998actions {
font-family:Verdana;font-size:11px;padding:10px 0;}
#yiv5612097998 #yiv5612097998activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}
#yiv5612097998 #yiv5612097998activity span {
font-weight:700;}
#yiv5612097998 #yiv5612097998activity span:first-child {
text-transform:uppercase;}
#yiv5612097998 #yiv5612097998activity span a {
color:#5085b6;text-decoration:none;}
#yiv5612097998 #yiv5612097998activity span span {
color:#ff7900;}
#yiv5612097998 #yiv5612097998activity span
.yiv5612097998underline {
text-decoration:underline;}
#yiv5612097998 .yiv5612097998attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}
#yiv5612097998 .yiv5612097998attach div a {
text-decoration:none;}
#yiv5612097998 .yiv5612097998attach img {
border:none;padding-right:5px;}
#yiv5612097998 .yiv5612097998attach label {
display:block;margin-bottom:5px;}
#yiv5612097998 .yiv5612097998attach label a {
text-decoration:none;}
#yiv5612097998 blockquote {
margin:0 0 0 4px;}
#yiv5612097998 .yiv5612097998bold {
font-family:Arial;font-size:13px;font-weight:700;}
#yiv5612097998 .yiv5612097998bold a {
text-decoration:none;}
#yiv5612097998 dd.yiv5612097998last p a {
font-family:Verdana;font-weight:700;}
#yiv5612097998 dd.yiv5612097998last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}
#yiv5612097998 dd.yiv5612097998last p
span.yiv5612097998yshortcuts {
margin-right:0;}
#yiv5612097998 div.yiv5612097998attach-table div div a {
text-decoration:none;}
#yiv5612097998 div.yiv5612097998attach-table {
width:400px;}
#yiv5612097998 div.yiv5612097998file-title a,
#yiv5612097998
div.yiv5612097998file-title a:active, #yiv5612097998
div.yiv5612097998file-title a:hover, #yiv5612097998
div.yiv5612097998file-title a:visited {
text-decoration:none;}
#yiv5612097998 div.yiv5612097998photo-title a,
#yiv5612097998 div.yiv5612097998photo-title a:active,
#yiv5612097998 div.yiv5612097998photo-title a:hover,
#yiv5612097998 div.yiv5612097998photo-title a:visited {
text-decoration:none;}
#yiv5612097998 div#yiv5612097998ygrp-mlmsg
#yiv5612097998ygrp-msg p a span.yiv5612097998yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}
#yiv5612097998 .yiv5612097998green {
color:#628c2a;}
#yiv5612097998 .yiv5612097998MsoNormal {
margin:0 0 0 0;}
#yiv5612097998 o {
font-size:0;}
#yiv5612097998 #yiv5612097998photos div {
float:left;width:72px;}
#yiv5612097998 #yiv5612097998photos div div {
border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}
#yiv5612097998 #yiv5612097998photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}
#yiv5612097998 #yiv5612097998reco-category {
font-size:77%;}
#yiv5612097998 #yiv5612097998reco-desc {
font-size:77%;}
#yiv5612097998 .yiv5612097998replbq {
margin:4px;}
#yiv5612097998 #yiv5612097998ygrp-actbar div a:first-child
{
margin-right:2px;padding-right:5px;}
#yiv5612097998 #yiv5612097998ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}
#yiv5612097998 #yiv5612097998ygrp-mlmsg table {
font-size:inherit;font:100%;}
#yiv5612097998 #yiv5612097998ygrp-mlmsg select,
#yiv5612097998 input, #yiv5612097998 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}
#yiv5612097998 #yiv5612097998ygrp-mlmsg pre,
#yiv5612097998
code {
font:115% monospace;}
#yiv5612097998 #yiv5612097998ygrp-mlmsg * {
line-height:1.22em;}
#yiv5612097998 #yiv5612097998ygrp-mlmsg #yiv5612097998logo
{
padding-bottom:10px;}
#yiv5612097998 #yiv5612097998ygrp-msg p a {
font-family:Verdana;}
#yiv5612097998 #yiv5612097998ygrp-msg
p#yiv5612097998attach-count span {
color:#1E66AE;font-weight:700;}
#yiv5612097998 #yiv5612097998ygrp-reco
#yiv5612097998reco-head {
color:#ff7900;font-weight:700;}
#yiv5612097998 #yiv5612097998ygrp-reco {
margin-bottom:20px;padding:0px;}
#yiv5612097998 #yiv5612097998ygrp-sponsor
#yiv5612097998ov
li a {
font-size:130%;text-decoration:none;}
#yiv5612097998 #yiv5612097998ygrp-sponsor
#yiv5612097998ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}
#yiv5612097998 #yiv5612097998ygrp-sponsor
#yiv5612097998ov
ul {
margin:0;padding:0 0 0 8px;}
#yiv5612097998 #yiv5612097998ygrp-text {
font-family:Georgia;}
#yiv5612097998 #yiv5612097998ygrp-text p {
margin:0 0 1em 0;}
#yiv5612097998 #yiv5612097998ygrp-text tt {
font-size:120%;}
#yiv5612097998 #yiv5612097998ygrp-vital ul li:last-child
{
border-right:none !important;
}
#yiv5612097998
------------------------------------
Posted by: Kambiz Afshartous <kenaf42@yahoo.com>
------------------------------------
------------------------------------
Yahoo Groups Links
#yiv5117803344 #yiv5117803344 --
#yiv5117803344ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}
#yiv5117803344 #yiv5117803344ygrp-mkp hr {
border:1px solid #d8d8d8;}
#yiv5117803344 #yiv5117803344ygrp-mkp #yiv5117803344hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}
#yiv5117803344 #yiv5117803344ygrp-mkp #yiv5117803344ads {
margin-bottom:10px;}
#yiv5117803344 #yiv5117803344ygrp-mkp .yiv5117803344ad {
padding:0 0;}
#yiv5117803344 #yiv5117803344ygrp-mkp .yiv5117803344ad p {
margin:0;}
#yiv5117803344 #yiv5117803344ygrp-mkp .yiv5117803344ad a {
color:#0000ff;text-decoration:none;}
#yiv5117803344 #yiv5117803344ygrp-sponsor
#yiv5117803344ygrp-lc {
font-family:Arial;}
#yiv5117803344 #yiv5117803344ygrp-sponsor
#yiv5117803344ygrp-lc #yiv5117803344hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}
#yiv5117803344 #yiv5117803344ygrp-sponsor
#yiv5117803344ygrp-lc .yiv5117803344ad {
margin-bottom:10px;padding:0 0;}
#yiv5117803344 #yiv5117803344actions {
font-family:Verdana;font-size:11px;padding:10px 0;}
#yiv5117803344 #yiv5117803344activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}
#yiv5117803344 #yiv5117803344activity span {
font-weight:700;}
#yiv5117803344 #yiv5117803344activity span:first-child {
text-transform:uppercase;}
#yiv5117803344 #yiv5117803344activity span a {
color:#5085b6;text-decoration:none;}
#yiv5117803344 #yiv5117803344activity span span {
color:#ff7900;}
#yiv5117803344 #yiv5117803344activity span
.yiv5117803344underline {
text-decoration:underline;}
#yiv5117803344 .yiv5117803344attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}
#yiv5117803344 .yiv5117803344attach div a {
text-decoration:none;}
#yiv5117803344 .yiv5117803344attach img {
border:none;padding-right:5px;}
#yiv5117803344 .yiv5117803344attach label {
display:block;margin-bottom:5px;}
#yiv5117803344 .yiv5117803344attach label a {
text-decoration:none;}
#yiv5117803344 blockquote {
margin:0 0 0 4px;}
#yiv5117803344 .yiv5117803344bold {
font-family:Arial;font-size:13px;font-weight:700;}
#yiv5117803344 .yiv5117803344bold a {
text-decoration:none;}
#yiv5117803344 dd.yiv5117803344last p a {
font-family:Verdana;font-weight:700;}
#yiv5117803344 dd.yiv5117803344last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}
#yiv5117803344 dd.yiv5117803344last p
span.yiv5117803344yshortcuts {
margin-right:0;}
#yiv5117803344 div.yiv5117803344attach-table div div a {
text-decoration:none;}
#yiv5117803344 div.yiv5117803344attach-table {
width:400px;}
#yiv5117803344 div.yiv5117803344file-title a, #yiv5117803344
div.yiv5117803344file-title a:active, #yiv5117803344
div.yiv5117803344file-title a:hover, #yiv5117803344
div.yiv5117803344file-title a:visited {
text-decoration:none;}
#yiv5117803344 div.yiv5117803344photo-title a,
#yiv5117803344 div.yiv5117803344photo-title a:active,
#yiv5117803344 div.yiv5117803344photo-title a:hover,
#yiv5117803344 div.yiv5117803344photo-title a:visited {
text-decoration:none;}
#yiv5117803344 div#yiv5117803344ygrp-mlmsg
#yiv5117803344ygrp-msg p a span.yiv5117803344yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}
#yiv5117803344 .yiv5117803344green {
color:#628c2a;}
#yiv5117803344 .yiv5117803344MsoNormal {
margin:0 0 0 0;}
#yiv5117803344 o {
font-size:0;}
#yiv5117803344 #yiv5117803344photos div {
float:left;width:72px;}
#yiv5117803344 #yiv5117803344photos div div {
border:1px solid
#666666;height:62px;overflow:hidden;width:62px;}
#yiv5117803344 #yiv5117803344photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}
#yiv5117803344 #yiv5117803344reco-category {
font-size:77%;}
#yiv5117803344 #yiv5117803344reco-desc {
font-size:77%;}
#yiv5117803344 .yiv5117803344replbq {
margin:4px;}
#yiv5117803344 #yiv5117803344ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}
#yiv5117803344 #yiv5117803344ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}
#yiv5117803344 #yiv5117803344ygrp-mlmsg table {
font-size:inherit;font:100%;}
#yiv5117803344 #yiv5117803344ygrp-mlmsg select,
#yiv5117803344 input, #yiv5117803344 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}
#yiv5117803344 #yiv5117803344ygrp-mlmsg pre, #yiv5117803344
code {
font:115% monospace;}
#yiv5117803344 #yiv5117803344ygrp-mlmsg * {
line-height:1.22em;}
#yiv5117803344 #yiv5117803344ygrp-mlmsg #yiv5117803344logo {
padding-bottom:10px;}
#yiv5117803344 #yiv5117803344ygrp-msg p a {
font-family:Verdana;}
#yiv5117803344 #yiv5117803344ygrp-msg
p#yiv5117803344attach-count span {
color:#1E66AE;font-weight:700;}
#yiv5117803344 #yiv5117803344ygrp-reco
#yiv5117803344reco-head {
color:#ff7900;font-weight:700;}
#yiv5117803344 #yiv5117803344ygrp-reco {
margin-bottom:20px;padding:0px;}
#yiv5117803344 #yiv5117803344ygrp-sponsor #yiv5117803344ov
li a {
font-size:130%;text-decoration:none;}
#yiv5117803344 #yiv5117803344ygrp-sponsor #yiv5117803344ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}
#yiv5117803344 #yiv5117803344ygrp-sponsor #yiv5117803344ov
ul {
margin:0;padding:0 0 0 8px;}
#yiv5117803344 #yiv5117803344ygrp-text {
font-family:Georgia;}
#yiv5117803344 #yiv5117803344ygrp-text p {
margin:0 0 1em 0;}
#yiv5117803344 #yiv5117803344ygrp-text tt {
font-size:120%;}
#yiv5117803344 #yiv5117803344ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv5117803344
Posted by: Kambiz Afshartous <kenaf42@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar