Sendkeys Alternatives

  • Thread starter Thread starter Ray Hogan
  • Start date Start date
R

Ray Hogan

Hi,
What are the alternatives/workarounds for the following "Sendkeys" actions.
1) "{ENTER}"
2) "{TAB}"
Thanks in anticipation.
Rayh
 
Hi,
Just two examples;
1) Senkeys "^{TAB}" to move from SubForm

2) DoCmd.Runcommand acCmdCopy
Sendkeys "{ENTER}

Regards.
Rayh
 
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.
 
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.
 
Back
Top