Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 2046 whilte trying DoCmd.RunCommand acCmdCopy 1

Status
Not open for further replies.

waldemar

Programmer
Nov 15, 2001
245
DE
Well this worked fine until a week ago...

Me.strAddressComplete.Value = ........
DoCmd.GoToControl "strAddressComplete"
DoCmd.RunCommand acCmdCopy

1. Assemble the Address, 2. set the focus to that control, 3. copy the whole thing... simple....

BUT recently Access returns an Error 2046 and stops at the RunCommand line... Anybody has a clue?

regards
waldemar
 
Is Access set to select the whole field by default when entering? (Tools->Options->Keyboard)
 
The whole field thing was it - thanks Trojan! Do you happen to know a way in VBA to ensure that this option is set to "whole field"?

regards
waldemar
 
I guess this will do the trick:

Application.SetOption "Behavior Entering Field", 0
: ' --- So DoCmd.RunCommand acCmdCopy will word ---

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top