SendKey problems with macro after converting to 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several macros that were created in Access 97 that use SendKey steps
to copy and past data from one form to another form (the first macro also
closes the first form, and the second form is opened by use of a command
button triggering another macro). In Access 97, everything works fine. In
the converted (Access 2003) version, they do not work. With some sleuthing
and testing, I have found that invoking the macros directly (not through the
command buttons) seems to work. Invoking through the command button in step
mode seems to work also. As my Access knowledge is limited (do not do Visual
Basic, etc.), I would like to get my current approach to work in Access 2003
instead of designing a new way to do what I need. Does anyone have a clue as
to what the problem/fix is?

Thanks in advance for any help that may be offered.
 
More info from experimenting... The simple conclusion seems to be that the
SendKey commands ^c and ^v work in Access 2003 macros when the macro is ran
from the macro window, but the same commands seem to be ignored when the same
macro is ran by way of a command button. Again, these same macros worked by
way of command buttons with no problems under Access 97. Is there something
about the command button code that renders these SendKey commands
non-functional?
 
I have several macros that were created in Access 97 that use SendKey steps
to copy and past data from one form to another form (the first macro also
closes the first form, and the second form is opened by use of a command
button triggering another macro). In Access 97, everything works fine. In
the converted (Access 2003) version, they do not work. With some sleuthing
and testing, I have found that invoking the macros directly (not through the
command buttons) seems to work. Invoking through the command button in step
mode seems to work also. As my Access knowledge is limited (do not do Visual
Basic, etc.), I would like to get my current approach to work in Access 2003
instead of designing a new way to do what I need. Does anyone have a clue as
to what the problem/fix is?

Thanks in advance for any help that may be offered.

Re-write the macros without using SendKeys. SendKeys is always a kludge
and, if used in serious production, is guaranteed to bite you.
 
After posting my question, I did find an alternative way (using RunCommand
statements) to get around the problem. Thanks for your reply--and I will
stay away from SendKeys statements!
 
Back
Top