G
Guest
I'm trying to set the OnClick property for a certain button on my form which
will prompt the activation of several other control buttons and hyperlinks.
I've tried the following code with two of the command buttons so far, but the
SendKey method will only work within the first document that is opened. I
don't want SendKey doing anything in the other non-Access documents.
Forms![CloseoutDocumentsCheckList]![SeeBlankTemplate].SetFocus
SendKeys "{ENTER}", True
Forms![CloseoutDocumentsCheckList]![PreviewTableofContents].SetFocus
SendKeys "{ENTER}", True
The first two lines of this code work perfectly, but the last two lines work
independently. The focus is set to the next command button
(PreviewTableofContents) but the SendKeys method applies its actions to the
document opened resulting from the use of the first command
button(SeeBlankTemplate).
I've read that SendKey can yield unreliable results, but I don't understand
why other than because of its inconsistency.
Any suggestions?
Nicole
will prompt the activation of several other control buttons and hyperlinks.
I've tried the following code with two of the command buttons so far, but the
SendKey method will only work within the first document that is opened. I
don't want SendKey doing anything in the other non-Access documents.
Forms![CloseoutDocumentsCheckList]![SeeBlankTemplate].SetFocus
SendKeys "{ENTER}", True
Forms![CloseoutDocumentsCheckList]![PreviewTableofContents].SetFocus
SendKeys "{ENTER}", True
The first two lines of this code work perfectly, but the last two lines work
independently. The focus is set to the next command button
(PreviewTableofContents) but the SendKeys method applies its actions to the
document opened resulting from the use of the first command
button(SeeBlankTemplate).
I've read that SendKey can yield unreliable results, but I don't understand
why other than because of its inconsistency.
Any suggestions?
Nicole