Set font name / size in Access Table?

desmond

Registered User.
Local time
Today, 12:27
Joined
Dec 8, 2009
Messages
28
Does anyone know how I can set the font name and size in VBA?

This doesn't seem to work:

Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim DB As Database

Set DB = CurrentDb
Set tdf = DB.TableDefs("TableTest")

Set fld = tdf.Fields("Field1")
fld.CreateProperty("DatasheetFontname") = "Courier New"

Set fld = tdf.Fields("Field1")
fld.Properties("DatasheetFontHeight") = 10

Any help will be most welcome.
 
I have no idea if you can set the font type and size in a table. However at the end of the day, you should be doing this at Form/Report level rather than table level. Tables are only for storing data not for displaying it, so what you are trying to do is rather an unnecessary exercise.

Users should Never have direct access to the tables, that's what your forms are for.
 
Last edited:
I think application.setoption is right method. search for it on the internet or access help.
 

Users who are viewing this thread

Back
Top Bottom