Results 1 to 11 of 11
  1. #1
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618

    Font size on sub form


    I am trying to learn how to set the font size on the sub form. The main form allows me control over the font size and displays the way I set it.
    1. Opening the sub form, Home Tab, setting font to 12. It changes, but when I open the main form where the sub form is the font is something else, maybe 14.
    2. Format Tab at the top or on the property sheet, it does not change to the size I want it.
    3. Click on File, Options, Data sheet; No luck yet.
    Click image for larger version. 

Name:	230430a.png 
Views:	16 
Size:	21.1 KB 
ID:	50172Click image for larger version. 

Name:	230430b.png 
Views:	16 
Size:	23.6 KB 
ID:	50173Click image for larger version. 

Name:	230430c.png 
Views:	16 
Size:	32.5 KB 
ID:	50174Click image for larger version. 

Name:	230430d.png 
Views:	16 
Size:	22.1 KB 
ID:	50175

  2. #2
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    271
    I think it's because that's the font size of your textbox controls. Since you are using a datasheet view, you could change the fontsize from the main ribbon, like you would if you were using Excel or Word.

    Edit:
    Excuse my lack of proper explanation for that, but there is a control in MSForms called ListView, the Datasheet View looks pretty similar to those ListView controls, as such, I don't think they share exactly the same properties as a regular form control, in fact, if you switch from presentation and then to form views, you will see different layouts, that happens on my end, I suppose the same happens with you. As for why, I would not know because I prefer continuous forms for this type of view.

  3. #3
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Thank you. I opened the main form, mark the Sub form control only, I changed the font size to 8. The size changes to 8 in design view. When I open the main form it is back to 14 or some size. Back to design view, the size is still 8.

    I did the same. Opening the Main form in design. Marking the text boxes on the sub form, change the size to 8. It changes in design to 8. Opening the main form, the size is back to 14 or some size?? Returning to design view, still 8.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Perhaps you are using my automatic form resizing code....
    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

  5. #5
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    271
    If main and sub are as the image:
    Click image for larger version. 

Name:	Untitled.png 
Views:	17 
Size:	107.5 KB 
ID:	50176
    You have two different views in that form, main is set to Single Form and sub is set to Datasheet.
    Click image for larger version. 

Name:	asd.png 
Views:	17 
Size:	18.6 KB 
ID:	50177
    What I meant in my first post is that the font size of forms that are set to Datasheet can be controlled from the ribbon, like in Excel and Word.
    Click image for larger version. 

Name:	asdasd.png 
Views:	18 
Size:	39.3 KB 
ID:	50178
    You selected textboxes, then you changed their font size. You would be able to see the changes if sub was set to something other than Datasheet. Since your form is set to Datasheet, you won't be able to control the font size from the properties of the textbox, but you can change the font size from the ribbon.

  6. #6
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Thanks. I don't know if I explain properly enough or don't understand well enough. I think I do what you say. Let us say I like font size 13.
    Option1
    1. I opened the Sub form on its own in design view, marked the text fields, change the font size in the ribbon to 8 to test. It changed instantly in design mode.
    2. I saved and closed the sub form, opened the main form in form view. The sub form displays font at size 14?
    3. Returning to the subform in design view, it still shows 8 and displays at size 8. Even when I open the subform in form view the size is 8.

    Option2. Doing what you suggest.
    1. Open the main form displaying in design view.
    2. Marking the text fields on the subform, changing the font size in the ribbon like you suggest.
    3. In design view it changes the font size on the sub form. Then save it.
    4. Open the main form but the font size is 14. You write I can change it from the ribbon.

    My app has more than 250 forms, half of them have sub forms. Not going to live long enough to change them to continuous forms.

  7. #7
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    271
    Don't change them. Can you post a sample database? Can we discard no code is changing forms on open, current, load, etc? Maybe you integrated isladogs form resizer?

  8. #8
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    You don’t change datasheet properties by modifying a control

    Try

    open subform on its own
    view in datasheet view
    from the ribbon, choose the font size you want
    save the subform

  9. #9
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    I will place a small sample soon.

  10. #10
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Thank you CJ. That seems to be working!

  11. #11
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    You can do this dynamically with vba if required. On my phone at the moment but think the property is called datasheetfontheight - Google to find out more

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

Similar Threads

  1. Replies: 12
    Last Post: 01-12-2019, 06:02 PM
  2. UI Font Size
    By bertsirkin in forum Access
    Replies: 4
    Last Post: 06-23-2017, 07:24 PM
  3. Form Font Size Larger in Access 2016 than 2010
    By tarzanphan60 in forum Forms
    Replies: 2
    Last Post: 10-26-2016, 04:40 AM
  4. Replies: 0
    Last Post: 09-11-2013, 10:49 AM
  5. Font Size control
    By techexpressinc in forum Forms
    Replies: 2
    Last Post: 06-29-2011, 06:26 AM

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