Split Form Not Using Font (1 Viewer)

JamesJoey

Registered User.
Local time
Today, 16:59
Joined
Dec 6, 2010
Messages
608
I'm using the following to set the font name for split form my datasheets:
Code:
Public Function DataSheetProperties(frm As Form)
  On Error GoTo DataSheetProperties_Error:
    frm.DatasheetFontName = "Calibri"
    frm.DatasheetFontHeight = 11
    frm.DatasheetFontWeight = 400
     On Error GoTo 0
   Exit Function
DataSheetProperties_Error:
    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure DataSheetProperties of Module Database Operations"
   On Error GoTo 0
   Exit Function
End Function

But unfortunately the font is not changing.
I'm calling 'DataSheetProperties' form the On Load of the form.
This seems to be occurring with all my forms.

I'm using access 2010.

James
 

isladogs

MVP / VIP
Local time
Today, 21:59
Joined
Jan 14, 2017
Messages
18,247
The link given by Gasman explains what I was going to write.
If you want more control over the appearance of individual columns you would need to use an emulated split form with a continuous 'subform' instead of a datasheet.

Alternatively you can use a theme to update your detail form font to Calibri 11pt and that will affect all forms including datasheets .... Unless you specifically alter them
 

JamesJoey

Registered User.
Local time
Today, 16:59
Joined
Dec 6, 2010
Messages
608
Gasman's link is fine but I will need to do this with every one of my splits.

I found that I need to force a save after changing the font in the Function.

If I change the font, open the form and press ctl-s, close the form a reopen it the datasheet honors the new font.

I was considering using emulating split forms using continuous forms.
I'll still consider that.
 

isladogs

MVP / VIP
Local time
Today, 21:59
Joined
Jan 14, 2017
Messages
18,247
Have you tried modifying the database theme so that the default form font is what you want? Mine also happens to be Calibri 11pt so that's what all datasheets are by default....unless I choose to change them
 

JamesJoey

Registered User.
Local time
Today, 16:59
Joined
Dec 6, 2010
Messages
608
That seems to work only sporadically or not at all.

I can use the link's instructions if and when I get bored of the current datasheet font..
 

Users who are viewing this thread

Top Bottom