General :: Subform Combo Box Restricted By Form Combo Box
Mar 28, 2014
I'm an Access newbie and I'm having trouble restricting a combo box on a subform based on the selection of the combo box on the form.The combo box (Combo1) on the main form (FrmOrganisation) gives a list of companies, I want the combo box (Combo2) in the subform (SbFrmEmployees) to list people only from that company. I then have a subform within that subform that displays information about the employee.
I have Customers recorded and a number of addresses associated with each customer.
They are in two tables linked by CustomerID and are shown in forms as frmCustomers & subfrmCustomerAddresses.
From frmCustomers, I open another form which records the orders maid by that customer. What I would like on this form is to select the customer address to be used for the order.
I can build a combo, but this shows all addresses on the database. What I would like for the combo to show only the addresses for that customer only.
I do not want two combos, one which selects the customer and then another which shows the addresses. This is not very user friendly to ask for the customer again. I would like one combo to show addresses for the customer on the form.
I would be grateful for any guidance on how I can achieve this.
I have a Suppliers database which contains a form that will allow me to place orders with Suppliers.The Main form has a combo box that allows me to select the supplier. The combo box is called SupplierID with the following:
Row source: SELECT Suppliers.SupplierID, Suppliers.CompanyName FROM Suppliers ORDER BY Suppliers.CompanyName;
The subform is called Stock Subform witha combo box called ProductID with the following:
Row source: SELECT DISTINCT Products.ProductID, Products.ProductName, Suppliers.CompanyName, Products.Discontinued FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID=Products.SupplierID WHERE (((Products.Discontinued)=0)) ORDER BY Products.ProductName; Event Procedure - AfterUpdate: Private Sub ProductID_AfterUpdate() On Error GoTo Err_ProductID_AfterUpdate Dim strFilter As String ' Evaluate filter before it's passed to DLookup function. strFilter = "ProductID = " & Me!ProductID
[code]..
The Link fields are done on the Purchase Order ID (PONoID).What I want to achieve is to select the supplier from the combo box (SupplierID) on the main form and then the combo box (ProductID) on the subform to filter to only show products directly supplied by the Supplier selected on the Main Form.
I use a combo box to select products and place in my order details sub form .I now realise i need a catogories table . How can i get my combo to look up a categories table then go the products of that table then enter in my orderdetails.
I'm creating a database for my inventory. For now, my database have two tables namely tblSupplies and tblDetails. I have a main from (frmMain) and a subform (subDetails). On the main form i have a combobox (cboSupplies) and 5 textboxes, the cboSupplies and the five textboxes are unbound. If I select a value in cboSupplies it will populate the rest of the textboxes-OK.
What I want to accomplish is that when I select a value in cboSupplies it will grab all related records from the tblDetails and populate these records on the subform (subDetails).
SuppliesID was used as the link field from mainform to subform but its not working. Please note that SuppliesID field in tblSupplies and tblDetails has a One-to-Many relationships.
I have a main form with a subform. On my main form, I have a combo box set to "find a record on my subform, based on what I select in the combo box." This works great! At the same time, I want to use this main form combo box to synchronize with a combo box in the subform to display a value based upon the value selected in the main form's combo box. I have tried several things and searched Access newsgroups without success. I am using MS Access 2002, producing an Access 2000 database. Has anyone got any ideas? I could really use some help. Thank-You.
I have a main form (FRMProspects) with a combo box (ComboCoName) that has a query as it's record source to sort the records displayed in it. It is bound by the CustID (autonumber), but displays the CompanyName.
What I want to do is open a sub form FRMNotes, based on the Company name that is selected in the ComboCoName. So for Company XY, I want to click on the Notes command button to open up all the notes for that company only (filtered). FRMNotes is based on a different table, but TBLProspects and TBLNotes are linked by CustID (one to many).
What code do I need for this? I am treading water with VBA!
Here goes my problem, and how I am attempting to solve it, but I am open to advice.
I have a table that contains all of the bird species in the US; (fields: common name, scientific name, species ID) I want to be able to update another table, (birds to chase) with particular bird species that I have not yet seen, (fields: species ID, common name, scientific name) and link that to a sub form that links to another table (chase birds locations) which shows geographic location data as to where I might be able to see new/unseen birds; (fields: species ID, date, other geographic data).
My problem is this. I created a form for the unseen birds table that allows me to only select a bird using a combo box of birds from the larger table of US birds. I want to select a bird using the common name in this box, and have it automatically populate the scientific name and the species ID into the birds to chase table. I link this tables to the location table using species ID.
A workaround that I have used is to close the form, run two update queries that populate the proper fields for scientific name and species ID and to re-open the forms. Although this works, when I return to the form it does not return me to the proper record, so that I can enter data into the sub-form.
Obviously this is a workaround and will work for me in the short run, but I want to learn how to do it properly within Access 2003.
I'm not a programmer and hence do not have access to the .NET tools or Visual Basic. Any hints for me out there?
I have a form named frmMain that contains five buttons that lead to subforms, one of which is named frmDeceased.
In frmDeceased, I needed to create a combo box that relied on selections from the combo box before it. I was able to do this successfully in frmDeceased, but then today when I opened the database and opened frmMain, I realized that the query fails when frmDeceased is opened via frmMain. It works perfectly if I just open frmDeceased directly.
The first combo box is ROHE and the second is Iwi (which is dependent on the Rohe selected).
The query for Iwi has this criteria: Forms!frmDeceased!cbo_ROHE
When I open frmDeceased through frmMain, I get the 'enter parameter value' message showing "Forms!frmDeceased!cbo_ROHE".
I tried changing this query to: Forms!frmMain!frmDeceased!cbo_ROHE, but it didn't work.
On clicking a button to open a form I want to filter a list in a combo Box located on the forms subform
The main form is called 'Frm_orders' The sub form is called 'sub' The combo box field is called 'CostCodeID' and I want to filter column 0 of the combobox which is Tbl_InvoiceCostCodes.Type to show records with a type of 'Repairs'
I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.
So my questions are:
1) can this be done 2)If it can be done, how can I do it?
I have a form build up with a subform in access 2003. Then I have an Insert button on this form which when clicked opens another form which is build up with a combo box. Now, when I select a field for example (Student_ID) from the combo box I would like to be in a position to click it once (the respective student_ID) so that the student_ID in that field is transferred to the subform of the initial form, which has a Student_ID field to store the respective student_ID in the table with the Subform.
In the Purchase Order details form a Supplier has to be chosen via a combo box. Based on that another combo box in the subform displays products only from this supplier (Products table is linked to supplier table).
I managed to let the subform combo show only relevant products using criteria referring to the main form combo box. Also other product data will show accordingly in text boxes. So far so good.
However when I close the form and reopen it the subform combo box is blank, other text boxes still show the right values. If I remove the filter criteria for the subform combo then all fields show all data correctly. (However the combo box is unfiltered again 8-/)
So somehow the 'criteria' prevents the combo to show the value that was previously chosen.
I want to create a Multiple Items form presenting Orders table with two Combo Boxes:
1. A combo box to select Order_Category_ID. 2. A combo box to select Order_Type. When 1 (Minor) is chosen in the first combo box it should show Book and Pencil, when 2 (Major) is chosen it should show Car and House.
Examples in the Internet show how to do it on a 'single row' forms using the RowSource property. I tried to use a query like:
SELECT Order_Type FROM Order_Type INNER JOIN Orders ON Order_Type.Order_Category_ID = Orders.Order_Category_ID WHERE Order_Category_ID = [comboBoxOrderCategoryID]
But it sets same values for all records in the Multiple Items form and it should return different values in each rows based on value in the first combo box (Order_Category_ID).
I have a create new record from with Employees information taken from tblEmployees. On that form I have a dropdown box of company names taken from tblCompanies. How do I get that to input a ClientID into tblEmployees when I add the new employee? At the moment it just adds a new employee but leaves the ClientID box blank.
I have designed a main form which have buttons for about 30 different companies name to open, each button opens an individual company form. Now the companies list is growing day by day so i want to create a combo box which select the company name and open the relevant company's form.
Do I need to create a table which lists all the companies and then add a combo box on a main screen which select the company name and open the form but i need a VBA code for that.
Within my main form I have a combo box called "workgroup." Also in the main form is a subform called "sfrmSubmissionRecords," and within this subform is a combo box called "covermemo."
Each cover memo is assigned to a specific workgroup, so my intention is for each time a new workgroup is selected from the dropdown, the covermemo combo box in the subform becomes populated only with the covermemos associated with that workgroup. I'm almost finished except for the final step when I try to make the values regenerate...Access says that can't find the referenced form "sfrmSubmissionRecords"
This is the code that I'm using:
Private Sub cmbWorkgroup_AfterUpdate() Forms![sfrmSubmissionRecords]![cmbCovermemo].Requery End Sub
I have seen a few articles here and there on using a combo box to filter records in a sub-form and to filter records in another combo box, but I am not getting anywhere. I hope someone can belp
Exercise 1
For this exercise, I have the following tables:
tblClients containing client names tblProjects containing some project details
I want to set up a simple form, so that the user can select a client name from a combo box on the main form which filters the project detail records in the Projects sub-form. Once the user enters project details, I want this info as well as the selected ClientID to be fed back to tblProjects.
Exercise 2
I have the following tables:
tblProjects as above tblWorkstream containiig names of workstreams and some other details.
Every project has one or more workstreams
I have a form where users will enter hours worked on each workstream. They will first select Project from a combo box on the main form. This should then filter records to be displayed in the Workstream Combo box, before they can then enter hours.
Please let me know if you need me to explain any part of this better.
Thanks in advance.
ps. I am a novice, so I'm hoping to do the above using default MS stuff, not with complex programming!!!
Where in Access 2010 I can modify the displayed fields of a Combo Box on a form. I need to format the display window and add criteria to one of the fields. Can't remember where I set this up and recently upgrading from Access 2007 isn't working.
I am having an issue trying to show all records when I load my form. It loads correctly when I don't have a record source for the main form. However, the combobox filters will not work. My goal is to have users be able to use the datasheet, subdatasheet and combobox filters. I can get the form to work just fine when I link the Main form and subform, but when the form opens it is filtered on the first record. I have been successful with this approach when using other forms, but they didn't require a subdatasheet.
Is there anyway I can have the comboboxes to filter yet be able to show all records until the user selects filters? Is this possible?I finally got my Manager to agree to use a database instead of Excel files based on this form setup and I need to make as "user friendly" as possible (look and function like a spreadsheet) I attached some pics of the form along with the code for the filter.
productId ( which is filtered from combo boxes on main form) . productId contains two columns 1 bound column(id) ( hidden with width 0 ) 2 column (desription) ( shown with width 2 )
Now after entering the data when i come back to the form again . It hides the data from the productId field on subform , because data in combo box (on main form) doesn't match. Although the row is showing up , only the text in field (productId) is hidden.
Now when i change data in combo box on main form to match the ProductId , then the productId field text shows again. after changing combo box it hides . What i need is the existing data should not hide when i change the combo box selection.
see pic 1 where product matches and pic 2 where not. please note i am using master child relationship on the form/subform.