Combo Box Values Based On Another Combo Box Selection
Feb 6, 2013
I have a form, with a subform and another subform
Once a supplier name is selected from the combo box i only want it displayed that suppliers products in the subform, subform. (products combo box) I can get a basic query to show these results but can get the combo box to do the same.
I'm stuck! I want to create a form which has a combo box where you select someone's name, and their address appears in another text box on the same form. The names and addresses are in a table called "cardholders".
I'm doing separate combos for first name, surname cos I think that's the only way you can do it.
The fields in the table are credit_add, credit_name & credit_surname. The combos are called "cardholder name" "cardholder surname" etc. This is the code in the text box where I want the address to appear:-
I am trying to write a query that gets all the telephone hours from a worker done under supervision in a town (qry_svhoursbytown). I have a table that has the workers details, including town (Crisis_support_workers), then another table that has what hours each worker has done (Supervision_Hours). The town is selected from a combo box on the form (frmSearch), under the heading �total hours by location�.
I try and select Bathurst then press recalculate results and in the text box next to supervision hours, it says 66, but if you look in the Supervision_Hours table, there is only 11 hours for the workers that are in Bathurst.
In the query, I have the sum total of the hours field in the Supervision_Hours table, the Town field from the Crisis_support_workers table with the total selected as Where and in that criteria I have [forms]![frmSearch]![ComboTown], then I just have the town field displayed.
What do I need to change to get it to sum correctly?
I have attached the database below so people can take a look.
I am having issues with my combo box populating values based on the selection from another combo box.
Database : contains 2 tables: Staff_List, Level_Type and a form called frm_Test The first combobox cboLevel gets its value from the Level_Type table with the select statement SELECT [Level_Type].[ID], [Level_Type].[Level_Type] FROM level_Type;
The values to be displayed on the second combobox cbo_Name is expected to be dependent on the Level selection made from the first combobox i.e if Level 1 is selected in cboLevel then only Names of people in Level 1 will be displayed in second combobox.
The select statement I put there is SELECT Staff_List.ID, Staff_List.Staff_Name FROM Staff_List WHERE ((([Staff_List]![Level])=[Forms]![frm_test]![cboLevel])); This is not displaying anything in the second combobox after I tried it in the Form view, just empty.
I have a combo box which gets its values from sql server using a query which is called "get_query_reason", which works fine. Now I want to update combo box values based on a user selection, st string. Have written the code, but does not work:
Dim qDef As QueryDef Dim Query As String Dim st As String Dim rs As Recordset st = "SOV" Set qDef = CurrentDb.QueryDefs("get_query_reason")
I have two combo boxes on the same form bound to a table. I want the contents of the next combo box to change based on the previous combo selection e.g
cboContinent cboCountry Africa Zambia Africa Congo Africa South africa Europe England Europe Holland
If I choose Africa in cboContinent, I want to see only Zambia, South Africa and Congo under cboCountry and if I choose Europe I want to see only England and Holland
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.
I'm trying to build a database for daily work. My work in daily basis I have to fill all condition for several items.
We have two areas, with two locations under each area, and three systems under each location and each system contain more than 500 items.
I created all tables and fill by all information:
1-Table 1: Area 1, Area 2, Area 3, Area 4, Area 5, Area 6. 2-Table 2: Location 1, Location 2. 3-Table 3: System 1, System 2, System 3. 4-Table 4: all items under System 1-1-1 5-Table 4: all items under System 1-1-2
[Code] ....
Last table will be LogBook which will be as follow:
date l time l area l location l system l item l Conition1 l Conition2 l Conition3
My question regarding to the form of the above table:
How can I make a combo box for area field and when I select for example area1 will appear only the locations which under area1 in location field, and when I select location1 for example will appear only the systems under location1 in system field, and when I select system1 one for example will appear only items under system 1.Combo box list will be based on the selection in previous combo box and so on.
I would like to set up rules/constraints such that the value selected in combo box A determines the available values in combo box B. For example, "Combo box A" is bound to the [PartnerType] field and "Combo box B" is bound to the [PartnerRole] field. Let's say that the two choices in Combo Box A are "LLC", "LP", and "Corporation". There are 5 possible choices in Combo Box B: "X", "Y", "Z", "Q", and "U". If a user selects "LP" in Combo Box A, I would like Combo Box B to only show choices "X" and "Y". And if a user selects "LLC", only choices "Y", "Z", "Q", and "U".
Similarly, I would like to set this up so that Combo Box B is not initially visible--it becomes visible when a user selects "LLC" or "LP". If a user selected "Corporation", Combo Box B would remain hidden.
I have a main form that filters data in a subform based on selections via combo box users make on the main form.
So I have the 'department' and 'manager's name'. If someone selects 'Human Resources' from 'department' combo box, then I only want to see the managers that are in the Human Resources departement when I drop down the combo box for 'manager's name'. Currently I'm seeing all the managers and a user can select a manager that is not in human resources and get no data returned. I prefer for him to get a list of those that are in that department only. The source of the combo box is a query.
After creating several combo boxes in my new forms, I noticed that there were blank values being displayed. Is there anyway of creating of creating a listing of unique values and not displaying any blank values for the user to select from?
I am working on a database to track IT assets with third parties. I have a table called "Equipment" that includes info like model, serial numbers, purchase price, date, location, and "Asset ID". I have a second, single field table called "asset tag" that is just a list of asset ID tags, XYZ1000, XYZ1001, XYZ1002..
I created a one to one relationship between the two tables on the following fields: "equipment.assetID" and "asset tag.asset ID"
Once an "asset ID" is used, I would like it to either be grayed out or disappear from the list of available ID tags. Basically, I want it so that each "asset tag. Asset ID" can only be used once.
if it is possible whereby if a user makes a selection in combobox 1 it must automatically generate the given vaules in combobox2 from the selection in combobox 1.
I know how to assign an event to a combo box, but I want to be able to launch a specific link, app, or email template, based on the actual selection from the combo box. So when I make a selection, whatever program or event I assign, to that specific selection, will launch.
I have an unbound combo box with three columns, which get the values from a query. The first column is hidden. When I close the combo box after my selection, only the second column value is shown on the box. Is there any way that both the second and third column being shown on the box after selection?
I want to insert obtain marks of the subjects. Find the attached my db. when i select combo value my requirement is to insert the all records which associate with the combo. but when i select combo value it will happen nothing.
I have a form with three subforms, and I'm having problem with one of them. The link between subforms and forms are store number, which is stored in a combo box. Idealy, after a user pick a store from the combo box, the subform would update itself. Two out of the three subforms are based on two crosstab queries and they work perfectly fine. The last subform is a select query, and it seems like it's not rerunning itself after updating the combo box. The query is very simple, it just has store number, description, and grouped by amount. I tried with no criteria in the store field and run the masterform,seems like all it's doing is showing value for the first store in the table, and never changes afterwards, I also tried entering "forms!frmStores!cmbStore" in the criteria for the store, then the subform came out empty, it seems like it's only reading combo box's default value null. I have a line of code for the mater form frmStores as "me.[DisplaySubform].requery" for all three subforms, but it seems like it's working for the first two and not the select query. Anybody can help me with this? oh, the combo box is unbounded, because i do not want my table to be updated by selection. Please help
I have almost completed my database, everything I had originally intended to implement into it has been done, with some extra added features I popped in along the way. There is just one more thing I require assistance with...
My database is used for booking camera kits in and out. On the add booking form the user has to pick a "Camera Type" from a combo box. When they have made their selection, a form pops up with details of all of the components contained within the kits. The user can then check/uncheck the relevant components and close the form.
I have used a command button which prints off the data contained within the current booking form, and also the data contained in the form that pops up when the camera type is selected.
However, as there are more than 1 different types of camera, comprising different components, I need to be able to print off the form relevant to the kit type.
I do not know how I can do this as I have just specified the command button to print the form for the default kit.
I basically need some VB code which will print the form based on my combo selection, as my knowledge of VB is pretty primitive, I was wondering if someone could help me out :)
Once the user has selected the customer, based on the airport selection there will be about 10 text boxes and a few checkboxes that I'd like to allow or "ghost" depending on whether we are contracted to carry out work for that customer.
I'm not new to object oriented programming but I am new to Access. I have found some questions similar to mine in search but I need more explanation if someone wouldn't mind.
In my form, I have a combo box that looks up 3 values from another table. Among other controls, I have a few text boxes that I only want visible if 1 of the 3 possible combo box options are selected.
I understand that the code for this should probably be placed in the "events" of the of the combo box...which one? I understand the logic but what would the code look like? Do I use the expression builder?
I have a form on which i make a selection. This selection then populates a query which in turn generates a report. The problem that i have is that when i go back into my form and make another selection the query, and therefore the report, holds the original data.
My question is how can i refresh the selection and therefore produce different reports based on this selection without exiting the application?
Hi guys . I created a form that has 3 combo boxes. Their name are Project Number, year and weekno . It has also a button that on click action supposed to generate a report baced on my combo box criteria and then loads that report for me. could any expert show me an example on how to do this. I have difficulty finding an example in google since i did not exactly what is called this method of generating report in access 2000.Thanks
I can't quite get my code right for populating one combo box based on the selection in another. I didn't create this Access database but I've been asked to add in a second combo box that is based on the selection of the first combo box.
My first combo box is for Rohe (the location of the Maori tribe) and the second is Iwi (the tribe name). So my first combo box (Rohe) has Dvic_ROHE written in the control source and its row source code is:
SELECT tblLookUpValues.DatabaseFieldValue FROM tblLookUpValues INNER JOIN tblFormQuestionLookUp ON tblLookUpValues.LookUpID = tblFormQuestionLookUp.LookUpID WHERE (((tblFormQuestionLookUp.FormID)=2) AND ((tblFormQuestionLookUp.QuestionNumber)=75)) ORDER BY tblLookUpValues.DisplayOrder;
The combo box for Rohe (tribe location) is populated by a table named tblLookUpValues. The second combo box for Iwi (tribe) has Dvic_Iwi in the control source. I created a table named tbl_Rohe_Iwi_lookup that contains ROHE (a list of tribe locations) and IWI (the tribes). There are 12 tribal locations and another 10-14 tribes in each location. The form that the Rohe and Iwi combo boxes are located on is called frmDeceased. This is the code that I attempted to write so that the second combo box (Iwi) is populated with only the tribes that are in the Rohe (location) that was selected from the Rohe combo box. But when I run the query it comes back with no results.
SELECT distinct tbl_Rohe_Iwi_lookup.Rohe, tbl_Rohe_Iwi_lookup.Iwi FROM tbl_Rohe_Iwi_lookup WHERE (((tbl_Rohe_Iwi_lookup.Rohe)=[forms]![frmDeceased]![Dvic_Rohe])) UNION select distinct null, null FROM tbl_Rohe_Iwi_lookup ORDER BY tbl_Rohe_Iwi_lookup.Iwi;
I am trying to get a report based on a selection from a combo box. The issue is many fold. Firstly I have been playing around with it so much that I have messed up the syntax and can't remember what I had. Here is what I have at the moment (this is based on a button):
The second issue is that it isn't filtering on the combobox - it gives all the data from the database based on all the entries in the combobox but this is probably down to the syntax again.