Question Locked

Access 2007 - SendKeys

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am upgrading from Access 97 to Access 2007. The following code works in 97 but not in 07. This code works by copying and pasting selected text into a field. Each time text is copied it pastes the text at the end of the previous text. It fails to work because it overwrites the previous text.

DoCmd.RunCommand acCmdCopy
DoCmd.GoToControl "NamedOther"
SendKeys "{F2}", True
DoCmd.RunCommand acCmdPaste
SendKeys "/ ", True

Anyone got any ideas - I have tried creating a multivalue field, but this has to be set to Limit to List = Yes

3 replies

by thumbsup2

While this article doesn't specifically mention those particular controls, the bottom line is that Access 2002, Access 2003, and Access 2007 remain compatible with Access 2000, but not Access 97.

http://support.microsoft.com/kb/246237/

That's just one of MANY articles throughout the MS site which all say about the same thing. Things changed when the 2000 version of all of the Office applications came out. Trying to convert from 97 to 2007 will require recoding everything.

by julie

Do you know what the code to copy and paste would be now in Access 2007?

This discussion is closed to new replies.