Memo Field/Form Control Annoyances

  • Thread starter Thread starter drummer9909
  • Start date Start date
D

drummer9909

Is there any way (other than disabling or eliminating the
tab stop) of prohibiting Access from highlighting all the
text in a memo field on a form? I have some novice users
that are accidentally erasing the entire contents of the
memo field in question, causing important data to vanish.
I've showed the users how to use the Escape key, but that
doesn't seem to sit well.

Is there any (built in) way I can keep the delicate
balance between securing a memo field, but keeping it as
flexible as it needs to be?

Thanks,
BK
 
Try setting the SelLength property of the control - using the GotFocus
event. You can also use SelStart to put the cursor at the end of the
existing text in the memo field.

Private Sub MyMemo_GotFocus()
Me.MyMemo.SelLength = 0
Me.MyMemo.SelStart = Len(Me.CertStatement)
End Sub
 
Tools|Options|Keyboard tab, Behavior Entering Field. This will affect all
controls, not just the textbox you are wanting fixed. For just the one
textbox, you can override this in the control's Enter event.

Me.txtNameOfTextbox.SelStart = Len(Me.txtNameOfTextbox.Text)
 
Back
Top