Results 1 to 8 of 8
  1. #1
    GOProductions is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    5

    Post RichText Shrinks on Focus

    Hey everyone,

    I have a slight issue when it comes to how the text is displayed in a RichText box when OnFocus. I need the text to be displayed exactly how it is, both when on focus and out of focus. However, when I select the text field, the text appears to "shrink", which makes it hard to format the text for the report. Here's a visual example (I added test text due to the confidential information):

    This is how the text appears when not selected. It also appears like this once a report is created (and is how it's supposed to look).
    Click image for larger version. 

Name:	RichText LostFocus.png 
Views:	9 
Size:	5.7 KB 
ID:	28664

    However, in order to format it correctly (as shown above), I have to add a couple of backspaces to the last column, making it appear as such:


    Click image for larger version. 

Name:	RichText OnFocus.png 
Views:	9 
Size:	5.8 KB 
ID:	28665

    If you look closely, not only does the text shift a little bit while in focus, but it "shrinks" ever so slightly.

    How do you think I would go about making sure the text remains the "same" both in focus, and not?

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    which makes it hard to format the text for the report
    Don't understand that statement. You've posted in the forms section but suggest there is a dependency between what you see on a form versus a report, but there is no dependency.

    Based on the images, I think you have a normalization problem, in that you appear to be putting too much information (multiple records) into one control, regardless of whether or not it is in a report or form. Or are those 3 columns individual controls? I'm thinking they are not.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    GOProductions is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    5
    I'm sorry for not being very clear! I have a moderate amount of knowledge with Access, but I don't know exactly how to describe my problem.

    So basically I have a form with multiple text boxes to fill out the applicable information. I then have a "create_report" control that creates a report based on a single record.

    The two images that I posted is for a single field, which is a RichText field. The columns that I created in that field are created with multiple spaces using the space bar (I know, it's awful....). The problem that I'm having is when I select that field, the spacing between the text appears to shrink, making it hard to make the columns line up perfectly (as seen in image 1).

  4. #4
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Still don't know if you have a normalization issue. If you don't understand that subject, look here
    Normalization Parts I, II, III, IV, and V
    http://rogersaccessblog.blogspot.ca/...on-part-i.html
    and/or
    http://holowczak.com/database-normalization/

    That may be the root of your problem (and many more to come if normalization is non-existent in your db) since you appear to be amalgamating data into one place (one control in a form or report). If normalization is not an underlying issue, I still don't understand why you're doing what you're doing. Plus, if this behaviour is in the form but the report looks OK, then should you worry?

    Sometimes hyperlink formatted controls will display applied formatting when they are not selected, but will show the actual/original format when they are - which is what I think you're experiencing. To repeat, your approach suggests you have bigger issues that you may not be aware of.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    GOProductions is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    5
    Mmmm... I don't think it has to deal with normalization. It's honestly comes down to an aesthetic problem. We are perfectly ok with how the database functions, and how we're inputting our data. Our only issue is trying to make it "better" and a little bit easier to input data into this field, that's all. Here's a GIF to show you what I'm dealing with.
    Click image for larger version. 

Name:	RichText GIF.gif 
Views:	9 
Size:	168.2 KB 
ID:	28669
    See how the text shifts once you select the field? All I'm trying to ask is if there is a way to STOP this from happening. Thanks for your help!

  6. #6
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I got it before, but thanks for pointing out that we can upload animated gifs! Just recalled that the behaviour might be due to not having both the control AND the underlying table memo (long text) field set to RichText. If that's not it, then post a compacted/repaired & zipped copy of your db if you want me to take a look at it. The only other thing I can think of is that you have code running on the enter or got focus events that's causing it, but I doubt that.

  7. #7
    GOProductions is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    5
    I WISH I could hand it over to you, but unfortunately, I'm dealing with a lot of confidential information :/ You are correct when you say there isn't any code on an enter or got focus event.

    But I think I'm on to something.

    I went ahead and created a test database with a long text control with RichText box. The default font is within Access is Calibre. Now with Calibre, I don't run into this issue at all; if you lose focus, it seems to "stay in place", so to speak.

    However, if you change the font to Times New Roman (which is the font we use), we run into this issue. Do you think this could be a bug with Access, or do you think RichText just doesn't "like" Times New Roman, and it just doesn't know how to calculate spacing between characters?

  8. #8
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I don't see anything about your post that tells me that the table field property is set to memo or long text (depends on your version) AND the format property in the field is Rich Text AND that the control format property is Rich Text. Bug is what a lot of people lean towards when it's often a matter of having the correct properties working in concert with each other. I can see one font in the table and another in the form text box (because the db font option is set differently from the form control) and when I move in and out of it, there's no change at all on the form.

    Often, unrelated tables and proprietary information have been removed from posted db's, so that may be an option for you. I don't know the answer to your latest question as I've never experienced or read about the behaviour before but having something to work with might get you help from others if not from me. I say that because you're using 2016, so if you use an incompatible feature, I sometimes can't open the db. Perhaps there is a 2016 bug or strange default behaviour, but don't forget that there's a font option for a text box control also.
    Last edited by Micron; 05-16-2017 at 05:29 PM. Reason: grammar
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Unbound Object Frame Shrinks Data When Edited
    By Squirrel1804 in forum Access
    Replies: 6
    Last Post: 11-05-2015, 05:53 PM
  2. Replies: 5
    Last Post: 10-04-2015, 05:23 PM
  3. Saving RichText data in SQL Tables
    By tylerg11 in forum SQL Server
    Replies: 2
    Last Post: 04-13-2013, 08:03 AM
  4. Will not set focus
    By AKQTS in forum Programming
    Replies: 4
    Last Post: 05-04-2011, 06:38 AM
  5. Access Shrinks my Document
    By Xiaoding in forum Reports
    Replies: 5
    Last Post: 11-13-2009, 02:11 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