Results 1 to 13 of 13
  1. #1
    Join Date
    Jan 2012
    Posts
    15

    A Textbox shows the beginning rather than the end of a Long Text field when opened

    I have upgraded from Access 2010 to Access 2016 (don't ask me why). I have a good, but not extraordinarily complex database that I use for my research. In my database I have a field called NOTES which is where I write about progress in my research. It used to be a memo field, but now it is set as Long Text after the upgrade. That doesn't seem to be a problem. I add text to the NOTES field on occasion, for example if a new result comes in. I have a form that allows you to select which NOTES field you want to add text to. After you select the NOTES field you want, a command button then executes a DoCmd.GoToControl "tboNotes", and a textbox opens with the Long Text field that was selected (tboNotes = rstRawData![Notes]).
    Because I want to date the new entry, I use vba code to automatically concatenate some asterisks and then today's date (& "***" & vDate & ": ") to the end of the NOTES field. So now I have the original text followed by some asterisks and today's date. I open that in the textbox on the form, and set the pointer to the end of the Long Text via SelStart. All that works fine. In my old version of Access, regardless of how much text there was, the textbox would show the last part of the NOTES field, so you could see the new date, the cursor would be at the end, and you could start typing immediately. When I upgraded, instead of the textbox showing the end of the NOTES field, it shows the beginning. So if my NOTES field is longer than the textbox can visually accommodate (I don't have a problem with number of characters in either, it is just visual), I have to scroll to the end of the field, and there is the new date and cursor waiting to enter new text. I want the flow of my report to go from oldest to newest notes, so I don't want to change the order of my notes entry. Maybe I am being childish, but I want it to act like it used to. Has anyone experienced a change in behavior in textboxes from older versions of Access to 2016? I know I could open a new text box, type in the new text and then append it, but it worked really smoothly before and I would like to get back to it.
    Thanks for any help you can offer.
    Gene

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746
    Suppose your long text had 3400 characters, and you want to add a new note with today's date.
    What exactly do you want to do?
    New note at start or end of the long text?

    What has changed such that the new dated text is at the opposite end of your long text field?

    Have you considered a tblNotes with long text notes broken into individual records of say 60 to 80 char per record and a number of records to be combined to make a longer note/paragraph? Long text may not be the best approach, but it may be.

  3. #3
    Join Date
    Jan 2012
    Posts
    15
    Hi orange. Thanks for responding. My intention is to have a chronological flow in the NOTES so that I can review what has happened in the chronological sequence that it happened, not in reverse order. That is why I want the new information to be saved at the end of the NOTES field and not at the beginning. Whether that is quirky or not, it is how I conceptualize my research, so I would rather work on changing VBA code than my thought process. It is certainly a possibility to chop up the field in the record into individual notes, and then concatenate them in the report, but first I would rather try to figure out if I can get back to the way it was.
    Gene

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746
    How do you know which note goes with which subject or task?
    Perhaps you could provide a sample of 2 or 3 notes to be added to the longNotes field.

  5. #5
    Join Date
    Jan 2012
    Posts
    15
    I am happy to supply details, but I think your question is taking a turn toward figuring out a way to reconstruct my database rather than simply trying to figure out if Textbox behavior has changed. All my client settings are the same and I am using the same backend and frontend databases. The only obvious change is Microsoft's change from Memo to Long Text. If this issue is idiosyncratic to my particular form, then I can institute your earlier suggestion. Right now, I'd just like to focus on the textbox behavior. Thanks.
    Gene

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746
    No I don't what to impact your set up. Just trying to understand what would cause the process/result to be "backwards" in 2010 vs 2016.
    When I processed long fields (memo) and needed to put some order on the contents. I used to use something like

    Code:
    Update longTable
    set longField = Now & " **** : " & NewNote & LongField
    it would seem you could reverse it with some thing like:

    Code:
    Update longTable
    set longField =  LongField & Now & " **** : " & NewNote

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,840
    I've never heard of this. If all the added notes pertaining to a record are in one field he only way I can think that this would happen is that somehow the cursor placement is wonky. Whether or not this can happen if the method of adding notes gets switched from editing directly in a table to being done via form, I have no clue. However, it may be an undiscovered reason to add to the list of many reasons why one should not edit directly in tables. Or maybe there's something about the code that we can't see, such as using Ribbon commands or functions to enter a form field and add the text, which might place the cursor in the wrong place.

    I think your question is taking a turn toward figuring out a way to reconstruct my database rather than simply trying to figure out if Textbox behavior has changed.
    Sometimes the message is one that the OP doesn't want to hear, I'm sure. In this case, I'll tell you anyway that the right method is to append your comments to a table of comments (as a new record each time) and add the edit date to the CmntDate field. This is a common approach, such as adding to a list of work order task completion comments because the WO task can be in progress for several days, being worked on by several people. Besides that, you will find it increasingly difficult if not impossible, to isolate comments between 2 dates, or all comments prior to or after a certain date, etc. The right way also doesn't require you to insert carriage returns or write even the simplest procedure to make the insertion.
    I will get off of my soapbox now!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    Join Date
    Jan 2012
    Posts
    15
    I am happy to hear alternatives, and appreciate the input, but as I said, it worked in earlier versions of Access. Converting to multiple records for each note isn't hard to understand or to program. I will give it a try. Thank you all for your time.
    Gene

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746
    I've played with a bit of code and a mock up (a table and form with some event code).
    I think this is what Gene is looking for generally, but I don't see how 2010 and 2016 would "reverse" the process.

    Click image for larger version. 

Name:	LongTextNewAtBottom.PNG 
Views:	17 
Size:	84.1 KB 
ID:	35451

    Gene please advise re further activity.

    The new note can be at top or at bottom based on the code concepts I showed in post #6.

    Note: I do have the following if you wan to pursue breaking long texts into shorter strings/records.

    ' Purpose: Break long text into lines of approx X characters(max) breaking at space or line break
    ' Procedure Kind: Sub
    ' Procedure Access: Public
    ' Author: Jack
    ' Date: 05-Sep-18
    '
    'This demo uses tables:
    '-A and
    '-tblShortCommentDemo
    ' Table A contains a lngComment field and other data
    ' Table tblShortCommentDemo will contain the short comments and
    ' info to link these records to the original records in Table A.
    ' The new shorter comments will have a sequence number so they can
    ' be reconstructed to the original (minus some double spaces and/or
    ' line breaks).

  10. #10
    Join Date
    Jan 2012
    Posts
    15
    Sorry orange, I have gotten some very good alternatives and don't need to go any further with this thread. I don't know how to mark it as "answered".

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,746

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,992
    Unless I've missed it, nobody has mentioned that this behaviour is a client setting and is easily altered.

    Click File...Access Options...Client Settings
    Find the setting 'Behaviour on entering field' and choose the most appropriate setting e.g. Go to end of field

    WARNING this will apply to all controls in all databases opened by that user.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  13. #13
    Join Date
    Jan 2012
    Posts
    15
    Thank you for the suggestion. Yours is actually is the first time someone addressed my original question rather than telling me how it can be done differently (and of course better). Please see my post of 11-Sept-18: 9:18:18 PM where I mention all my client settings are the same in both editions. I have tried all variations on a theme of different client settings, and as I also said, the cursor does end up at the end of the field after the newly appended date exactly where I wanted it to be. The textbox just reveals the beginning rather than the end of the field, so I have to scroll down to find the cursor and the added date which are in the appropriate place. Is there something similar in the textbox properties on the form as you are mentioning about the client settings?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Long Text field in report
    By QuyitLady in forum Reports
    Replies: 11
    Last Post: 01-24-2018, 01:00 PM
  2. how much text in long integer field?
    By accessmatt in forum Database Design
    Replies: 10
    Last Post: 12-22-2014, 03:54 PM
  3. Lookup field shows ID # and not text
    By kelkan in forum Forms
    Replies: 3
    Last Post: 01-26-2013, 09:19 PM
  4. Text box shows ID field and not the Name
    By jzacharias in forum Access
    Replies: 5
    Last Post: 10-18-2012, 10:24 AM
  5. Replies: 7
    Last Post: 02-21-2012, 05:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums