Textbox Control

  • Thread starter Thread starter Proposal Doctor
  • Start date Start date
P

Proposal Doctor

I use two large textboxes on a form to create project descriptions. Is there
a way to prevent the insertion point in the source box from moving to the top
when I enter information in the opposite text box?

Thx.

David
 
We aren't there. We can't see what you're looking at.

What do you mean "the opposite text box"?

What do you mean "prevent ... from moving to the top"?

Regards

Jeff Boyce
Microsoft Access MVP
 
Thanks Jeff.

I have two textboxes side-by-side on the form, each is about 6 inches by 8
inches.

One textbox is the source box for the project descriptions and one is the
destination textbox. When I put the insertion point in the source box, the
target box forgets where the insertion point was the last time it had focus.

I want the target box to remember the exact point where the insertion point
was last and return to that position when it receives the focus again.

Can this be done?

David

P.S.
The textboxes are not on a subform. All the objects on the form use the
same table.
 
Proposal said:
I use two large textboxes on a form to create project descriptions. Is there
a way to prevent the insertion point in the source box from moving to the top
when I enter information in the opposite text box?


Try experimenting with code something like:

Module level declaration:
Private lngStart As Long

Enter event procedure:
Me.sourcetextbox.SelStart = lngStart
Me.sourcetextbox.SelLength = 0

Exit event procedure:
lngStart = Me.sourcetextbox.SelStart
 
Sorry, I am not Chip.

Your solution is one that I had not thought of but is definitely one that I
can implement and will probably use a lot, as most of my apps include
numerous memo fields. I am always looking for ways to make better use of
memo fields.

Thank you.

David
 
Thanks Marsh,

This code is above my skill level so please provide me with the number of a
KB article or text that will help me understand what the code does.

David
 
I don't know of any articles that discuss this kind of
thing. Look up any part of it that you do not understand in
VBA Help (in the Visual Basic editor window). If you have a
problem interpreting what the help topics say, come on back
with a specific question.

I added a few comments to the code that may provide a few
more clues.
--
Marsh
MVP [MS Access]


Proposal said:
This code is above my skill level so please provide me with the number of a
KB article or text that will help me understand what the code does.
'set cursor position back to where it was
'when last left the text box
 
Back
Top