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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

me.refresh while typing in a textbox

Status
Not open for further replies.

patfee

Programmer
Dec 14, 2004
78
NL
hi,
when i type in a textbox the onchange event trigger the form to refresh

after the refresh event, the textbox text is selected and the cursor is at position 1. So if you wish to type an other character, you overwrite was was already typed

is there a way to avoid / correct this?

so that after the refresh event, i can continue typing without erasing the previous characters.

Note that i wish to keep the form refresh in order to "filter" other other elements using the same characters.

Thanks,
Patrick
 
Your form may get a bit "bumby" by this, I suppose, but try

[tt]me!txtYourControl.selstart=len(nz(me!txtYourControl.value,""))[/tt]

Roy-Vidar
 
I suppose a quick fix would be to use sendkeys and send the END key as the argument.

It's not a highly recommended way as if you switch applications the END key could be sent to another currently running application. However, the END key is fairly inoccuous.

Have a look as SENDKEYS in help.

There is more than one way to skin a cat...but who wants a skinned cat?
 
Sendkeys it is!! the F2 key works perfectly!!

Thanks very much!

Patrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top