By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Automation of key strokes

P: n/a
Hello,

In Excel VBA, using SendKeys in a Sub procedure with a shortcut
running the Sub/macro, I can replace a users's fingers and press keys
for him. How can I do this in Access?

I would like to assign a shortcut key combination, such as Ctrl+e to
the key sequence F10+V+Q.

How do I do that?

Cheers.

Marc R. Bertrand
mr*@goalseek.net
www.goalseek.net
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Access also has SendKeys. From Access Help article "SendKeys
Statement": Syntax: string[, wait]

string Required. String expression specifying the keystrokes to send.

wait Optional. Boolean value specifying the wait mode. If False
(default), control is returned to the procedure immediately after the
keys are sent. If True, keystrokes must be processed before control is
returned to the procedure.

Read the help article for more info.

You don't say where you want this "macro" to run from. If from a form,
see the help article on "KeyPress Event" which describes how to capture
the key combinations.

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP2eZnYechKqOuFEgEQKabwCfQwVrP1TCGgJ7vXd4nNcEmP 1Ax9gAoOfY
x4veXWJAygDbHT3OdKY0kSFW
=DQi0
-----END PGP SIGNATURE-----
"Marc R. Bertrand" wrote:

Hello,

In Excel VBA, using SendKeys in a Sub procedure with a shortcut
running the Sub/macro, I can replace a users's fingers and press keys
for him. How can I do this in Access?

I would like to assign a shortcut key combination, such as Ctrl+e to
the key sequence F10+V+Q.

How do I do that?

Cheers.

Marc R. Bertrand
mr*@goalseek.net
www.goalseek.net


Nov 12 '05 #2

P: n/a
Hi,

I have figured out a scheme that works just fine to toggle between SQL
view and Datasheet view. I am practicing my SQL and I run, as you can
imagine, all sorts of queries, inspecting the results in Datasheet
view.

I use a quick two-strike combination to go from SQL view to Datasheet
view:
I do Ctrl+r using an AutoKeys macro with ^r for name and OpenQuery for
action.
But I don't really have a quick way to go from Datasheet view to SQL
view. All I have figured out so far is a key combination that simply
uses the menu: Alt+v+q.

Perhaps with SendKeys I could build a second shortcut combination to
go from Datasheet view to SQL view. Unless you know of a way that
doesn't use sendkey.
(I read a thread that suggested just that, but it didn't work).

Cheers.

Marc Bertrand

MGFoster <mg***@earthlink.net> wrote in message news:<3F***************@earthlink.net>...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Access also has SendKeys. From Access Help article "SendKeys
Statement": Syntax: string[, wait]

string Required. String expression specifying the keystrokes to send.

wait Optional. Boolean value specifying the wait mode. If False
(default), control is returned to the procedure immediately after the
keys are sent. If True, keystrokes must be processed before control is
returned to the procedure.

Read the help article for more info.

You don't say where you want this "macro" to run from. If from a form,
see the help article on "KeyPress Event" which describes how to capture
the key combinations.

HTH,

MGFoster:::mgf
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP2eZnYechKqOuFEgEQKabwCfQwVrP1TCGgJ7vXd4nNcEmP 1Ax9gAoOfY
x4veXWJAygDbHT3OdKY0kSFW
=DQi0
-----END PGP SIGNATURE-----
"Marc R. Bertrand" wrote:

Hello,

In Excel VBA, using SendKeys in a Sub procedure with a shortcut
running the Sub/macro, I can replace a users's fingers and press keys
for him. How can I do this in Access?

I would like to assign a shortcut key combination, such as Ctrl+e to
the key sequence F10+V+Q.

How do I do that?

Cheers.

Marc R. Bertrand
mr*@goalseek.net
www.goalseek.net

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.