Sendkeys Alternatives

R

Ray Hogan

Hi,
What are the alternatives/workarounds for the following "Sendkeys" actions.
1) "{ENTER}"
2) "{TAB}"
Thanks in anticipation.
Rayh
 
R

Ray Hogan

Hi,
Just two examples;
1) Senkeys "^{TAB}" to move from SubForm

2) DoCmd.Runcommand acCmdCopy
Sendkeys "{ENTER}

Regards.
Rayh
 
D

Duane Hookom

1) can't you just set the focus to the main form?
2) docmd.RunCommand accmdcopy
I think there are more robust options than using sendkeys.
 
J

John Vinson

Hi,
Just two examples;
1) Senkeys "^{TAB}" to move from SubForm
Parent.SetFocus
Parent.controlname.SetFocus

2) DoCmd.Runcommand acCmdCopy
Sendkeys "{ENTER}

If you're copying the contents of one control to another control,
don't use acCmdCopy; just set the value of the control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

VBA word change keys 0
SendKeys with enter 1
sendkeys 0
Converting macros from Excel 2003 to Excel 2010 - Client Access dialog 3
ActiveX 1
SendKeys "+{right}" problem 1
IE code 0
SendKeys 3

Top