Costefran . . .
For starters I have this working (per your post origination) in A2k with no problem.
As already related to by [blue]Remou[/blue] and the error you posted ...
Costefran said:
[blue]I get the error message "Microsoft Access [purple]can't find[/purple] the Others_Cost_Codes referred to in your expression[/blue]
... [blue]you have a definite naming problem![/blue]
In your post origination you say:
Costefran said:
[blue] . . . when the user clicks on the control ("[purple]Named Others_Cost_Codes[/purple]") the cursor stays wherever the user clicked . . .[/blue]
Then you go on to say:
Costefran said:
[blue]I have tried
Me.[purple]Others_Cost_Codes[/purple].SelStart=0[/blue]
Note the two names in purple in the quotes:
[purple]
Named Others_Cost_Codes[/purple]
[purple]
Others_Cost_Codes[/purple]
Not quite the same and [blue]the reason for the error![/blue]
Now, in [blue]Remou's[/blue] advice for changing the name, he meant to change the name of the controls [blue]Name[/blue] property! ... not the table.
So to fix this (for now):
[ol][li]Set the controls [blue]Name[/blue] property to [blue]Test[/blue] [red](no quotations please!)[/red].[/li]
[li]In the controls [blue]On Got Focus[/blue], copy/paste:
Code:
[blue] Me!Test.SelStart = 0[/blue]
[/li]
[li]Be sure to remove any other code in any other event you have to handle this [blue](we don't need any interaction!)[/blue].[/li]
[li][blue]Thats it! Perform your testing![/blue]
If all works well you can revert back to your origional control name! Just be sure the [blue]Name[/blue] property is the same. To be sure you nail it, use the following syntax instead:
Code:
[blue] Me("[purple][b][i]ControlName[/i][/b][/purple]").SelStart = 0[/blue]
[/li][/ol]
[blue]Your Thoughts? . . .[/blue]
See Ya! . . . . . .
Be sure to see thread181-473997 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)
Also faq181-2886 [blue]Worthy Reading![/blue]
![[thumbsup2] [thumbsup2] [thumbsup2]](/data/assets/smilies/thumbsup2.gif)