davesmith202
Employee of Access World
- Local time
- Today, 06:07
- Joined
- Jul 20, 2001
- Messages
- 522
I have the following code that is triggered when I click a command button:
When I click the button, it goes to the TopicBody field (memo) and puts the value in (e.g. "London ") and the value is highlighted. Then it goes unhighlighted when the Sendkeys "{End}" kicks in.
When I do this manually on the keyboard it works. i.e. hitting End will go to othe end of the text in the TopicBody field. e.g. cursor is at end of "London ".
But when I do it in code it does not do this.
What am I doing wrong?
Thanks,
Dave
Code:
TopicBody = Town & " "
DoCmd.GoToControl "TopicBody"
Pause 1
SendKeys "{End}"
When I click the button, it goes to the TopicBody field (memo) and puts the value in (e.g. "London ") and the value is highlighted. Then it goes unhighlighted when the Sendkeys "{End}" kicks in.
When I do this manually on the keyboard it works. i.e. hitting End will go to othe end of the text in the TopicBody field. e.g. cursor is at end of "London ".
But when I do it in code it does not do this.
What am I doing wrong?
Thanks,
Dave