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

DoCmd.OpenForm with Memo fields

Status
Not open for further replies.

apestaart

Technical User
Feb 5, 2004
107
0
0
NL
Using DoCmd.OpenForm "FormName",acNormal,,,acFormEdit gives me a result that I don't want.
It opens the form and goes to the first field in my case a memo field. The complete text is highlighted and the cursor is at the beginning of the text.
What I want is to set the cursor at the end of the memoblock, so that I can give in additional data. (With no Highlighting)
Changing acFormEdit to acFormAdd works, but than I can't see the exsisting data in the field.

Who can help me?
Regards
apestaart
 
Hi, apestaart,

Have a look at the SetFocus, SelStart, and SelLength methods.

Ken S.
 
Hallo Eupher,
That I did already, but I can't use that in my oppinion.
How can I set the cursor to the last caracter of the memo field plus 1? And let the highlighting dissapire?
Apestaart
 
In the Enter event procedure of the TextBox:
Me![name of textbox].SelStart = 1 + Len(Me![name of textbox].Text)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Under Tools >> Options you can set the position of the cursor in a text box.
 
Thanks for your help! It works in the way PH discriped and
ment by Eupher.
Regards Apestaart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top