Sorry I uploaded the wrong file. Kindly see my reply above for the new files.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.but there's no report in the database? Or am I missing something?
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.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?
I have nothing that opens rar files, so I'll skip this now.
Nope. No changes in default settings. I even printed it to PDF.Office programs can be sensitive to the installed fonts on the printer - any changes in the default printer setting?
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.If I zip it, the file is around 8mb I cannot attach it here.
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.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.
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
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 differenceThat 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.
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.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. 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.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
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: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.
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
function setallcontrols(f as form)
dim ctrl as control
for each ctrl in f.controls
ctrl.font = "segoe black"
next
end function
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.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)