Font selection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramdil
    New Member
    • Dec 2007
    • 46

    Font selection

    Hi all
    I have a two requirement in access.Is it possible to change the font programmaticall y .If so can you give me the code for that.To be clear , now if i want to change the font , i go to design view and then change,is there any way to change at run time rather than design.

    Thanks in advance
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. It would be helpful to know what type of item is involved. Assuming it is a control on a form or report, the syntax for changing the font of a control from code within the form or report's code module is just

    me.[name of control].fontname = "Name of Font"

    Example:

    Me.ctrlSummary. Fontname = "Times New Roman"

    -Stewart

    Comment

    • ramdil
      New Member
      • Dec 2007
      • 46

      #3
      Hi
      Thanks for the reply.Actually i was looking some thing like datepicker type functionality ..For eg in run time if i am pressing a button font selector should come.Is it possible .I have a done spell checker like this on click of button,spell cheker will be visible and then i can do the operation at run time,so same thing is font select available.




      Originally posted by Stewart Ross Inverness
      Hi. It would be helpful to know what type of item is involved. Assuming it is a control on a form or report, the syntax for changing the font of a control from code within the form or report's code module is just

      me.[name of control].fontname = "Name of Font"

      Example:

      Me.ctrlSummary. Fontname = "Times New Roman"

      -Stewart

      Comment

      • Stewart Ross
        Recognized Expert Moderator Specialist
        • Feb 2008
        • 2545

        #4
        Originally posted by ramdil
        ...Actually i was looking some thing like datepicker type functionality ..For eg in run time if i am pressing a button font selector should come...
        Hi again. I'm not sure what value there would be in having the font dialogue available to users at run-time - it must be rare indeed for there to be a need to do this in an Access application! To the best of my knowledge the font picker dialogue is not available at runtime as a native Access capability. I would suggest that, if this is functionality that you really, really need, you look at calling the standard Windows API fonts dialogue, but I have not investigated this further at present.

        Regards

        Stewart

        Comment

        Working...