I have a proc that copies all the text from a field on a form. Works great when the Database Option "Behavior entering field" is set to ( ) Select entire field. One of my clients prefers ( ) Go to start of field. When the last option is selected my code BLOWS! The Applicable code is
Me![Control].SetFocus
Docmd.RunCommand acCmdCOpy
To resolve this one, I have changed the code to
Me![Control].SetFocus
If me![Control].SelLength = 0 Then
SendKeys "{F2}"
End IF
Docmd.RunCommand acCmdCopy
This works great and I'm almost happy. However somewhere in some past version of MS Access I recall reading the SendKeys should not be used (If possible). I have searched to find the code that will do what SendKeys "{F2}" will do but must need another cup of java this morning because I cannot find it.
So my question is is (sound like BIll Clinton) there anything I can use that is blessed by the powers to be to replace it?
Thanks for your help
Me![Control].SetFocus
Docmd.RunCommand acCmdCOpy
To resolve this one, I have changed the code to
Me![Control].SetFocus
If me![Control].SelLength = 0 Then
SendKeys "{F2}"
End IF
Docmd.RunCommand acCmdCopy
This works great and I'm almost happy. However somewhere in some past version of MS Access I recall reading the SendKeys should not be used (If possible). I have searched to find the code that will do what SendKeys "{F2}" will do but must need another cup of java this morning because I cannot find it.
So my question is is (sound like BIll Clinton) there anything I can use that is blessed by the powers to be to replace it?
Thanks for your help