Font style changing to Arial after closing and opening of Access File (1 Viewer)

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
but there's no report in the database? Or am I missing something?
Sorry I uploaded the wrong file. Kindly see my reply above for the new files.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:45
Joined
Feb 19, 2002
Messages
43,266
Before uploading an app always compact it. You can also remove a lot of the data since we only need a little data to look at things.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:45
Joined
Feb 19, 2013
Messages
16,610
suggest remove non relevant data, compact/repair then use winzip
 

Gasman

Enthusiastic Amateur
Local time
Today, 13:45
Joined
Sep 21, 2011
Messages
14,288
Why on earth would you zip a rar file?. The file is the same size? :(
What is wrong with just using standard windows zip.? Are you using Linux or the like? :unsure:

I have nothing that opens rar files, so I'll skip this now.
 

wvmitchell

New member
Local time
Today, 05:45
Joined
Sep 4, 2020
Messages
24
Office programs can be sensitive to the installed fonts on the printer - any changes in the default printer setting?
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
Why on earth would you zip a rar file?. The file is the same size? :(
What is wrong with just using standard windows zip.? Are you using Linux or the like? :unsure:

I have nothing that opens rar files, so I'll skip this now.
Sorry for the inconvenience. If I zip it, the file is around 8mb I cannot attach it here.. ( i already repaired and compacted the db).. If I rar it it goes down to 2mb.
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
Office programs can be sensitive to the installed fonts on the printer - any changes in the default printer setting?
Nope. No changes in default settings. I even printed it to PDF.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 13:45
Joined
Feb 19, 2013
Messages
16,610
If I zip it, the file is around 8mb I cannot attach it here.
so remove tables not relevant to your question and if still too large, remove some of the data from the remaining tables, just leave enough to demonstrate the problem.
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
so remove tables not relevant to your question and if still too large, remove some of the data from the remaining tables, just leave enough to demonstrate the problem.
That is one of the mystery really. I deleted all the tables except 1 empty. Basically the content of my stripped db is one empty table and a report demonstrating the Font Style problem. Still my file is around 11mb even after repeated Repair and Compact.

Anyways please find below the Google drive link of my uncompressed access file.

Google Drive link of my Test Database
 
Last edited:

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:45
Joined
Sep 12, 2006
Messages
15,653
@EmEx.

Am I missing something? The only thing that was in the database you uploaded was a table. We need to see the report that isn't working correctly.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:45
Joined
Sep 12, 2006
Messages
15,653
Ok. I downloaded your database. The large font text box is formatted as

Segoe UI Black
Font Size 28
Font Weight Normal
Fore Colour Text 1, Lighter 25% (not sure precisely what that indicates - I think it's related to the data element of the them you are using)

I added a button to do this

Code:
Private Sub Command2_Click()
'fontweight 400 is normal, 700 is bold

    MsgBox "fontweight is currently: " & Me.Text0.FontWeight
   
    If Me.Text0.FontWeight = 400 Then
        Me.Text0.FontWeight = 700
        DoEvents
        MsgBox "fontweight set to: " & Me.Text0.FontWeight
    Else
        Me.Text0.FontWeight = 400
        DoEvents
        MsgBox "fontweight set to: " & Me.Text0.FontWeight
    End If
   
End Sub

It works, but doesn't change the display. Well it worked to change the display once, but it wouldn't turn it back again, At some point it stopped changing it at all, and I can't get the original behaviour back now.

Now, with Arial font instead, the font toggle button changes the font appearance back and forth. With your Segoe font it isn't changing.

However, what I did notice is that if I just search for a Segoe font all I get is

Segoe UI (Header) and
Segoe UI (Detail) which aren't marked as TrueType

If I search specifically for Segoe UI black, I see a number of TrueType options with the weight described in the font name. I can only imagine that you have to change to a different Segoe font name to get a different fontweight. Maybe there is something special about this particular font. Googling it says it's the default font for W10, so maybe it is "special".

Hope this helps. Perhaps try a different font!

If you use this in a machine without the Segoe font, Access may decide to use Arial as the nearest replacement.
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 13:45
Joined
Feb 19, 2013
Messages
16,610
That is one of the mystery really. I deleted all the tables except 1 empty. Basically the content of my stripped db is one empty table and a report demonstrating the Font Style problem. Still my file is around 11mb even after repeated Repair and Compact.
that says to me it's corrupted. Create a new db and under the external tab, import your tables etc. See if that makes a difference
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
Ok. I downloaded your database. The large font text box is formatted as

Segoe UI Black
Font Size 28
Font Weight Normal
Fore Colour Text 1, Lighter 25% (not sure precisely what that indicates - I think it's related to the data element of the them you are using)

I added a button to do this

Code:
Private Sub Command2_Click()
'fontweight 400 is normal, 700 is bold

    MsgBox "fontweight is currently: " & Me.Text0.FontWeight
  
    If Me.Text0.FontWeight = 400 Then
        Me.Text0.FontWeight = 700
        DoEvents
        MsgBox "fontweight set to: " & Me.Text0.FontWeight
    Else
        Me.Text0.FontWeight = 400
        DoEvents
        MsgBox "fontweight set to: " & Me.Text0.FontWeight
    End If
  
End Sub

It works, but doesn't change the display. Well it worked to change the display once, but it wouldn't turn it back again, At some point it stopped changing it at all, and I can't get the original behaviour back now.

Now, with Arial font instead, the font toggle button changes the font appearance back and forth. With your Segoe font it isn't changing.

However, what I did notice is that if I just search for a Segoe font all I get is

Segoe UI (Header) and
Segoe UI (Detail) which aren't marked as TrueType

If I search specifically for Segoe UI black, I see a number of TrueType options with the weight described in the font name. I can only imagine that you have to change to a different Segoe font name to get a different fontweight. Maybe there is something special about this particular font. Googling it says it's the default font for W10, so maybe it is "special".

Hope this helps. Perhaps try a different font!

If you use this in a machine without the Segoe font, Access may decide to use Arial as the nearest replacement.
Thanks. Glad to hear somebody else had personally witnessed the problem. I originally think it's on my pc only (or on the other pcs in my workplace). Anyways you did notice that on the first time the Font is set, there is no problem whatsoever... but after closing and reopening of the file weird things starting to happen. You may be right that something about Segoe is special. If I use the regular styles of Segoe (ex. Reg, Italic, Bold, Bold Italic) no problem occurs. Maybe it's just the Black ones that are problematic because tried using Arial Black (note: black) = and the same problem happens.
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
that says to me it's corrupted. Create a new db and under the external tab, import your tables etc. See if that makes a difference
Thanks. I tried your suggestion and magically the problem with the font style is resolved. Now I tried it with the original access project I have been working on and you are right, that also solved the problem. Or so I thought. Because a couple of closing and opening later, the newly imported project began to show the same symptoms again. I am starting to suspect it's the choice of font that is the culprit here. Nonstandard fonts like black, condensed, heavy, etc. may have made the access program confused.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:45
Joined
Feb 28, 2001
Messages
27,179
There used to be an issue with Hattenschweiler some years ago, in which you could pick some other font to be your default for all Access projects but what you set for the default didn't matter. Hattenschweiler came back like a bad penny. THAT was a licensing issue, but the important thing is that code existed in Microsoft back then to replace font choices with other fonts.

Here is what i recall about fonts: the Windows font-rendering engine will do its best to render type using your font selection. However, if it is unable to do so because of either a security issue or a damaged file, the font code tries to determine the characteristics of the failing font (of which there are not less than five not counting size) and find the nearest replacement font that comes closest to the one you specified.

If for some reason your chosen font is somehow damaged or deemed insecure or something else bizarre then I suspect that information comes back to Access and that gives it a cause to replace the font with another one that matches its properties. It has been a long time since I looked into that, but the characteristics included internal line width (bold/normal/thin and several gradations), line fill (solid/hollow/other), kerning (on/off), proportional (true/false), and some things related to serifs.

This might be tricky to do, and maybe you would find this too much of a pain in the toches, but it is possible to uninstall a font. Uninstall the font you DON'T want to see and see if your oddball textbox gets replaced by something else. Be warned that this is a rather extreme solution and might require use of a Windows Installation disk to recover that font if you later want it for other purposes. It has been several years since I did that but I had to do it because of a 3rd party TrueType font that had a loop in it.
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
There used to be an issue with Hattenschweiler some years ago, in which you could pick some other font to be your default for all Access projects but what you set for the default didn't matter. Hattenschweiler came back like a bad penny. THAT was a licensing issue, but the important thing is that code existed in Microsoft back then to replace font choices with other fonts.

Here is what i recall about fonts: the Windows font-rendering engine will do its best to render type using your font selection. However, if it is unable to do so because of either a security issue or a damaged file, the font code tries to determine the characteristics of the failing font (of which there are not less than five not counting size) and find the nearest replacement font that comes closest to the one you specified.

If for some reason your chosen font is somehow damaged or deemed insecure or something else bizarre then I suspect that information comes back to Access and that gives it a cause to replace the font with another one that matches its properties. It has been a long time since I looked into that, but the characteristics included internal line width (bold/normal/thin and several gradations), line fill (solid/hollow/other), kerning (on/off), proportional (true/false), and some things related to serifs.

This might be tricky to do, and maybe you would find this too much of a pain in the toches, but it is possible to uninstall a font. Uninstall the font you DON'T want to see and see if your oddball textbox gets replaced by something else. Be warned that this is a rather extreme solution and might require use of a Windows Installation disk to recover that font if you later want it for other purposes. It has been several years since I did that but I had to do it because of a 3rd party TrueType font that had a loop in it.
I toyed around with @gemma-the-husky's idea of setting the font property using vba code. But instead of setting the font weight, I set the FONTNAME on the report's OnLoad event:

Me.controlname.FontName = "Segoe UI Black"

..and the trick did it... but setting fontname to every control can be "pain in the ***"...:unsure:
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:45
Joined
Sep 12, 2006
Messages
15,653
Does it need to be Segoe? I thought it might be something you were using to print barcodes initially.
Given that the property options showed all these descriptive Segoe fonts, I think you probably do have to pick a different font name rather than font weight to get the effect you want, but it will be a pain.

You don't have to set every control manually.
You can do this sort of thing in the form's open event. You may need a bit of error handling in case some controls don't have a font property.
Note this is just air code and may not be 100%.

Some of us make use a controls "tag" property if we only to process certain controls to this font.

Code:
dim ctrl as control
for each ctrl in me.controls
     'if ctl.tag = "test value" 'see above re tag property
     ctrl.font = "segoe black"
next

You can even have a slight variation of this as function in a module

Code:
function setallcontrols(f as form)
dim ctrl as control
for each ctrl in f.controls
     ctrl.font = "segoe black"
next
end function

and call this in the form's open or load event

Code:
setallcontrols(me)
 

EmEx

New member
Local time
Today, 20:45
Joined
Jan 25, 2021
Messages
26
Does it need to be Segoe? I thought it might be something you were using to print barcodes initially.
Given that the property options showed all these descriptive Segoe fonts, I think you probably do have to pick a different font name rather than font weight to get the effect you want, but it will be a pain.

You don't have to set every control manually.
You can do this sort of thing in the form's open event. You may need a bit of error handling in case some controls don't have a font property.
Note this is just air code and may not be 100%.

Some of us make use a controls "tag" property if we only to process certain controls to this font.

Code:
dim ctrl as control
for each ctrl in me.controls
     'if ctl.tag = "test value" 'see above re tag property
     ctrl.font = "segoe black"
next

You can even have a slight variation of this as function in a module

Code:
function setallcontrols(f as form)
dim ctrl as control
for each ctrl in f.controls
     ctrl.font = "segoe black"
next
end function

and call this in the form's open or load event

Code:
setallcontrols(me)
Thanks. Will consider your suggestion. But for the update, stating the fontname works for a while though... like your experience with a button earlier. It goes back to same problem after repeated opening and closing. I can test your new suggestion to see it it does not change after a while.

It does not have to be Segoe.. I already tested with Arial (BLACK) and several other fonts that comes with Windows and same problem. I noticed if I used only fonts that has a complete set of styles (Reg, Bold and Italics) no problem occurs.

Maybe it is the behavior of the Access program. I just want to establish its limitation as a sort of guide upon creating future project.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:45
Joined
Feb 28, 2001
Messages
27,179
I've never seen this behavior with Access other than when there was a licensing issue with Hattenschweiler font. Given that I have used some symbol fonts and some obscure fonts that SURELY could not be counted as having a "complete set of styles" - I don't think I have ever seen a font reset like that. The Hattenschweiler case was a "default font."

But something occurred to me. Are you by any chance using style sheets?
 

Users who are viewing this thread

Top Bottom