Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Apr 2001
    Location
    Washington
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fill Combo Box with List of Avaliable Font Names (MS Access 2000)

    I would like to fill a combo box with a list of font names that are avaiable on the local machine. How might I do that?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fill Combo Box with List of Avaliable Font Names (MS Access 2000)

    On my machine, the fonts are found under C:WinNTfonts. What are you trying to do?

    If you want to set fonts on a form or whatever from code, look up the FontName property in Access help or the DataSheetFontName property for changing the font a datasheet view displays. There is also a Microsoft common dialog that will allow you to specify fonts. Are you trying to create a form to do something similar?
    Charlotte

  3. #3
    New Lounger
    Join Date
    Apr 2001
    Location
    Washington
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fill Combo Box with List of Avaliable Font Names (MS Access 2000)

    Thanks for your response.

    I have a table for form letters which contains a memo field into which the user will put the text for form letters. Along with this memo field are other fields for Bold, Italic, Underline, Font, and Font Size that allow the user to set how the this memo field will be printed as a whole. On the corresponding form I have controls for each of these fields. The Font control is a combo box in which I would like to list available fonts on the local machine for selection instead of hardcoding some fonts that are possibly on the local machine.

    I found some code on the Micrsoft Developer's Network that is supposed to do this using Printer.FontCount and Printer.Font, but I get "Variable not defined" for "Printer".

    Thanks for any help you can give.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fill Combo Box with List of Avaliable Font Names (MS Access 2000)

    Is the code intended for use from Access or from Word? I would expect Printer to be an object, but Access doesn't have a printer object, so it may be a custom class designed to hide PrtDevMode operations ... or not. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> You might look up PrtDevMode in On-line help for some ways to manipulate printer settings from Access (and elsewhere).
    Charlotte

  5. #5
    New Lounger
    Join Date
    Apr 2001
    Location
    Washington
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fill Combo Box with List of Avaliable Font Names (MS Access 2000)

    It is intended for Access only. When the report is printed, I will set the font of the textbox on the report with the font name in the combo box. Therefore, I want the combox box to list all of the available fonts on the local machine. The alternative is to hardcode a fontlist into the combo box with fonts likely to be on a machine like Times New Roman, Arial, etc. Thanks for any further suggestions you may have.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •