MS Access Question: how to change a default view of text field shows bottom of text lines

HIROYUKI TAMURA
HIROYUKI TAMURA used Ask the Experts™
on
I would like to change default view of text field shows the bottom line of text on MS Access form

snap266.pngDatabase5.accdb
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
John TsioumprisSoftware & Systems Engineer

Commented:
Can you elaborate a bit on this...what you want to accomplish ?
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
You will need to do that yourself f you want to stick to controls.   Data is normally added to the end of a memo field.   In this case, you want to add data in front of data that already exists.

  What I would suggest is in place of a memo field, use a child table and then a subform in place of the memo control.   By doing that and including a create date & time in the record, you can display the data in descending order.

Jim.
Senior Developer
Commented:
You need to set the SelStart property to the last character:

Private Sub MoveToLastChar(ByVal CTextBox As Access.TextBox)

  On Local Error Resume Next

  CTextBox.SetFocus
  CTextBox.SelStart = Len(CTextBox.Value)

End Sub

Open in new window

Call it after you have loaded the current row, e.g. in the On Current event.
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
I concur with Jim.  I hate having more that one item in a single field of a record (violates database 1st Normal Form), and that is what you are doing when you add numeric values to each of those rows in the textbox.
Distinguished Expert 2017

Commented:
Let me jump on the proper normalization bandwagon with Jim and Dale.  In addition to the create date and time, I would also add a CreatedBy field so you know who wrote the note.  In most of my applications, notes CANNOT be changed once they are saved.  To give people a little flexibility, we generally give the note a one hour window and allow changes within that "hour" by the original author only.  In the cases where we    allow this, we allow one change ONLY and we keep the original text and add a "modified" flag to the comment.  Notes, once created can never be deleted.  A supervisor can mark them as "deleted" and they will not show in normal forms and reports but can be made visible again if necessary.  This requires a delete date and time as well as a deletedBy if we are going to allow shadow deletes.

The reason for the extra security on notes fields in some situations, is because they may need to be referenced in court cases.  So consider that in your design plan.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial