Modules & VBA :: Populate Combo Box With Names Of Installed Fonts On Computer
Jan 22, 2014
I need to give users the ability to change the font of a field in a report. The field shows a barcode.
I thought of using the CommonDlg class to show the Windows font-selecting dialog box, but installed barcode fonts show as a barcode. I need to show the font name.
So I need to populate a combo box with the names of all fonts installed on a computer.
The fonts reside in C:windowsfonts
I have searched Google for a solution but cannot find one.
How do I populate a combo box with the names of all fonts installed on a computer?
How can I list the printers installed on the computer in a listbox? The following code list them in a message box, but I need the user to be able to select one to save it in a table. The listbox is called lstListPrinters and the table tblPrinterSelection
Code: If Printers.Count > 0 Then ' Get count of installed printers. strMsg = "Printers installed: " & Printers.Count & vbCrLf & vbCrLf ' Enumerate printer system properties. For Each prtLoop In Application.Printers
I am trying to populate a ListBox with the names of the tables from another database. I have the following function which loops the table names from the database I want. The function is caleld on Form Load and passed into the ListBox but the List Box is empty.The message box in the function does display the table names when called from the form. I just cannot get the list box to populate.
Code:
Public Function ListTables() Dim db As Database Dim i As Integer Dim s As String Dim tdefs As TableDefs, tdef As TableDef Set db = DBEngine.OpenDatabase("C:MyPathAnalyzed Tables.mdb")
My company is finally using my accounts package (alongside our original package until we can be certain there are no bugs).
Anyway just adding nice to have features at the moment.
I've got a form that has 5 combo boxes where the user can select 5 customers. Then a button so they can graph the amount of money generated by each customer and compare them.
I've just made a query to return the top 5 highest grossing customers.
What I what to do now it feed the query results into the combobox values when I press a new button on my form.
My database will be creating quotes based on employees entries. Each quote will be unique because of the part. Each part has the potential to have Precious Metals, and Base Metals included. The employee must select the number Precious Metals and Base Metals that a particular part has. The problem lies with what happens after this selection is made. There are three fields that need to be defined pertaining to each metal. I need the number selected to determine how many fields to make available. If there are two precious metals, I need to make the three fields available twice; one for both metals. I have the possibility for up to 5 Precious Metals and 10 Base Metals per part. How can I make the selection from a combo box populate that number of Metals Fields?
I have an unbound combobox on a form that is used to filter the records of a subform based on who they have been assigned to. The combo box is based off of a query to the personnel table and utilizes a UNION querry to add the option "**ALL**" with a id number "111111" as the first option in the combo box.
In other words: the combo box has a list of names to choose from and the word "ALL" at the top as the first selection. The idea is that when "**ALL**" is selected, the subform should display all records regardless of who they have been assigned to. I'm trying to accomplish this with VBA. I've started developing the code to try to impliment this, however currently when "**ALL**" is selected, I'm getting a datatype missmatch that seems to be caused by my use of recordset.
I have a form set up (in a list box) to show our salespeople what parts they have yet to get out of inventory but have a sales order for. The list box shows a list of all the salespeoples names. My manager wants me to show ONLY the salespeople that have populated fields in this list box. The list box currently shows all the salespeople, but I want to see only the ones that have inventory that has yet to shipped. How do I go about this?
I have several comboboxes (6) on my form.How to populate these comboboxes with values depending on selected value in previous combobox.
Example.Lets say that you select value "Audi" in combobox 1, then available values in combobox 2 should be "A4","A6","TT" etc. and if you selected "BMW" in combobox 1, then available values in combobox 2 should be "3-series", "5-series" etc...
I'm have quite a difficult time getting a form in Access 2010 to perform the way I would like it to. I have multiple tables that I've created, and a query that contains the data from the various tables. I then ran the form wizard to select the data from the query that I wanted to populate in my form and I've added 2 combo boxes.
What I want to do: 1. I want users to be able to select a category in combo box #1 (example: "Bag") 2. I want users to be able to select a detail in combo box #2 based on the category they selected in combo box #1 (example: Combo box #1, "bag" would populate the following selections for combo box #2: "sandwich" and "tool") 3. I want users to then receive a list of suppliers that provide the product they have selected, either "Bag: Sandwich" or "Bag: Tool"
I have combo box #1 populating a list of categories already. However, I am not able to get combo box #2 to provide choices based on the selection chosen for combo box #1.
1. I want to populate a list box with all the Tables Names in my Database using VBA.
2. I also want to create another List Box or Grid (or any thing that will show table data) that when i have select a Table Name (See above (1)) it will show all the data in that table in the List Box. Was thinking some kind of SQL using vba to populate the list box?
Hello to all on this site, I am hoping someone here can help me in my journey to learning Access. I have some experience writing simple/moderate code in VBA for Excel, but I am now using Access to create a database to monitor/track progress on projects for an initiative at my work place.
My question revolves around using Combo Boxes. I have one table/form (tblEventSummary/frmEventSummary) where the user will enter data regarding a project they are working on. One field is called txtEventLeader. What I want to do is to create a combobox which will allow the user to either select a name from the dropdown list (of names that have been previously used) or to enter a new one. When entering a future form, I want any new names used to also be displayed in the combobox.
I was kind of successful doing this already using a query (qryEmployees), but if the same name is used in txtEventLeader, I then see that name twice in the combobox and in the associated query. I would appreciate any recommendations for what to do here. Hopefully I was able to ask a clear enough question...
How do you display the names of field for a table in a combo box. I know how to do it in mySQL "DESCRIBE employee_data", is there a SQL command in access to do this?
my search form has a combo box with "make"names. i can add new makes via a other form. so the combo box needs te run via a query so that it can list new makes (so that i can also search them). but, since some makes repeat them selves in the table, sometimes up to 15 times (see atachment 1), the combo box will show 15 times the same make. i just need it to show the make 1 time, all of the makes just 1 time. only way i can do that is to type them my self (see atachment 2). but then new makes that are added later wont be shown in the list.
so: i want that the make is only shown once in the list, and that the list is updated with new makes that are added later. how do i do that?
note: a "make" E.G = Philips, Apple, LG, Microsoft, creative etc (just for the lesser skilled english readers like me )
I have a combo box that brings up records for an individual. I have people with the same last names and have their first names showing on the combo box list, but when i choose one of them, it will always go to the name of the person who was entered first, so matter who i pick(that has the same last name).
I am a self-admitted beginner so go easy . I have a query populated with all of my data. I am building a form based on two columns in the query: Pick Up Name, and Deliver to Name. Lets say I have records for company XYZ picking up at location A three seperate times, location B once, and location C four times. On the form I want to have my first combo box listing all the names of column "Pick Up Name". When I scroll down and select company XYZ, I want my second combo box to only display the three locations where company XYZ has picked up: A, B and C. Then I want the option of selecting either A, B or C and in a third box, display total number of times that company XYZ has picked up at selected location.
For example, I select company XYZ from the first drop-down. I select C from the second drop-down, from the list of three locations. I get a result of four, because company XYZ has delivered to location C four times.
Right now, I have my first combo box with the Pick Up Name data, where do I go from here? Any help or nudges in the right direction greatly appreciated!
I developed a report using Courier New font. When I print to a HP4050 from my computer the report is correct. When I print to the same printer from a different computer fields are truncated as if it is using a proportional font. Any idea as to whether this is a Windows or Access issue? Thank you in advance for any help...
I've recently started working on a new database and already have most of my forms, queries and reports ready. However, I've been using a special font that is not available on most PCs. I was wondering whether it was possible to save the font inside the MDB file so that it can be viewed properly on other systems as well ? (Sort of like in Powerpoint).
Another thing (I guess it's impossible but I'll ask anyway) : Is it possible to save the whole Windows Style design (Scroll Bars, Arrows, Icons, Menu colors, etc..) in my database file ?
Currently, I have a form with a combobox that lists all of the names of the tables inside my database. Depending on the table selected in the first combobox, I would like to have another combobox which allows the user to choose from the field names inside that table.
I have developed a MS Access tool to be used in multiuser environ. In some computers, the tool is working while in some, there is an error message-"Provider not found. May not installed properly". Is it problem with the script or is it that the provider was not installed with MS Office. I have used ADODB connection.
I browsed a lot of posts related to fonts, and pored over my "Mastering Access 2000" and "Access 2000 Power Programming" books, but I couldn't find answers to my specific questions.
I have many years of experience with Access, but I've only recently become interested in making my forms look nice on a variety of user PC configurations. Now, like many others, I sometimes spend too much time formatting a form so it looks really nice on my PC, only to find formatting problems on the user's PC. For example, a label using Arial Rounded MT Bold looks great on my PC but is cut off on the user's PC. Similarly, Tahoma on buttons looks nice on my PC but looks bigger and bolder on the user's PC.
At first I thought this was probably a font problem. But then I realized that even with the same screen resolution, the forms themselves (not just the fonts) appeared bigger on the user's PC. Some forms didn't even fit inside a maximized Access window, whereas they certainly did on my PC - again, this is with the same screen resolution. So now I don't know if it's a font problem, some other problem, or perhaps multiple problems.
Which leads to my questions:
(1) If I set the size of a form on my PC, and the screen resolution is the same on my PC and the user's PC, then why does my form show up relatively bigger on some users' PCs? How can one control the look of a form if the form properties are not applied identically on different PCs?
(2) Why do all the fonts look bigger and fatter / bolder on some users' PCs?
(3) Is there a user-configurable Windows setting that overrides the font size settings I assign to controls?
(4) How can I determine in code if specific fonts are supported (if this is a necessary step)?
(5) What is the industry best practice for managing font selection, allowing for the possibility that the desired fonts may not be supported?