Share via

SendKeys syntax

Anonymous
2012-08-21T19:43:19+00:00

I am trying to use SendKeys in Access 2010.  I cannot seem to be able to use the keystrokes {Ctrl & '} (the copy down command) or the {Enter}.

I need to make a series of 8  {Ctrl & '} {Enter} to make the data entry job a lot easier. Any suggestions?

I would also like to make a hot key to run the macro.

Mike

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2012-08-22T03:37:58+00:00

That was my idea. User was hitting the same keystroke many times, so I suggested to create an AutoKeys macro to do it for him. I also mentioned a possible problematic database design. See this original thread: http://answers.microsoft.com/en-us/office/forum/office_2010-access/i-am-looking-for-a-way-copy-keystrokes-for-data/17bcb7d1-5a7f-45c5-a7d8-c51f16157bbe 

I was able to create the macro in A2010 as follows:

* Follow instructions from http://eileenslounge.com/viewtopic.php?f=29&t=7927   (thanks Hans!)

* Setup F12 macro, with a single action SendKeys (requires clicking Show All Actions), and specifying ^' for the keystroke.

* Open the Order Details form (this is in the Northwind sample app), go to the last record, go to a new record, then hit F12 and it copies the previous record to the new record.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2012-08-21T22:29:42+00:00

    Please explain further what it is that this is supposed to do.  SendKeys is something you should avoid at all costs.  It is unreliable and, when working with later OS's it isn't always available.

    Was this answer helpful?

    0 comments No comments