msacces 2010 how to create table with comboboxes in subtable from many related tables - ms-access

I have the tables:
products, measures, colors
for each product I have related measures and colors.
Also I have a form with subtable where I need to show the table with columns:
[products] comboboxColumn, [measures] comboboxColumn and [colors] comboboxColumn.
The rows should be selected product, selected measure, selected color.
The question is:
how can I filter the measures ComboBox list for [measures] combobox-Cell (or colors ComboBox list) in my grid selected row, when I choosing a product from [products] combobox-Cell in that very selected row?

I suggest you use a continuous form rather than a datasheet. Create the combo and populate it with the relevant values in the current event and bind it to the correct field in your table. To avoid confusing the user, include a textbox bound to that field also. You can lock the textbox and label the combobox column something like "Choose Size". You can use conditional formatting to make the whole think prettier.

Related

Can I bind 3 comboboxes to one form?

Each of three columns: cust_id, cust_name, cust_company are in are in three combo boxes, each returning the cust_id as the key. When any of the combo boxes has a value chosen, I'd like to update a sub-form's data. I'm new to access, but my background is programming. I've yet to figure out where anything is beyond create wizards and property sheets, so be gentle.
Thanks!
Jimbus
Use three subforms:
Make the main form unbound
Place the three comboboxes to select cust_id on the main form
Place the tab control on the main form
Place a subform on each of the three pages of the tab control
On the main form, for each of the subforms, set these properties of the subform control that holds it:
LinkChildFields: The foreign key of the subform (cust_id)
LinkMasterFields: The combobox used to select cust_id for the subform
Zero code.

Fill item Id in form based on a combo box that selects item name. MS-Access

I have a Sales form that contains the ItemSoldID field.
It was difficult to write itemSoldID for every item by memory because new items are frequently added and the list has reached to More than 100 Items. It is difficult to remember id number for every item.
I want to make a combo box. That should Choose Item Name in the box and the ItemSoldID gets autofilled based on the Selection.
I tried dlookup on gotfocus property of ItemSoldID but i am new to access. Something is wrong.
Please Help............

Filter combobox dropdown options using textbox value in Access 2013

I have a form in Access with a textbox and a combobox, and need to filter the combobox dropdown options using the value in the textbox. The textbox contains a Category for the choices.
I've done this using
SELECT Options.Choice
FROM Options
WHERE (((Options.Category)=[forms]![FormName]![Text10].Value));
Is there a way to refer to the value in Text10 without explicitly referring to FormName?
I'll need to duplicate this form within the same Access file and changing all combobox row sources for a new form is not feasible. I can't hard code the Category value for each combobox because there are many comboboxes per form, and the value in the textbox will be different on every form. Any help is appreciated.
You can refer to whatever form you're currently on in Access using Screen.ActiveForm. So in your case you'd have:
SELECT Options.Choice
FROM Options
WHERE (((Options.Category)=[Screen].[ActiveForm]![Text10].Value));
As long as the field name stays constant this should work.

MS Access: Why is my combo box displaying the wrong value?

I have 2 columns that populate my combo box. They come from a table where I manually wrote in an ID and a clean_value field.
The goal:
Display both columns on a combo box on a form. The ID values should be on the left of the clean_value values when looking at the drop down list. When selecting something in the list, the combo box should display the clean_value, not the ID. When saving the form, the form should write the ID value to a different table.
What I've tried:
I set up the table to get the values from. I set up the combo box to show the 2 values in the correct orientation. The ID value is the value that is being written to the table.
The problem: When the user selects one of the values in the list, their selection shows the ID. I want to display the clean_value upon selection instead. How do I do this?
I found a way to do this. I grabbed the clean_value field, the ID field, then the clean_value field again in the row source, then I just set the width of the first clean_value field to 0.021".

One combo box for two queries Access

I have a form that needs to use two combo boxes but the values in the second combo should come from two different tables based on the first combo selection. If I select option A in combo_1 I want to list all the agency names from tblRefAgency in combo_2. If I select option B in combo_1 I want to list all of the carriers from tblrefCarrier in combo_2. I can add VB code to hide/show two different combo boxes and then overlap them, but I feel I should be able to do this in a query. Thoughts?
As long as you are dealing with a single form, you can easily set the row source of the second combo in the After Update event of the first combo.
If Me.Combo1=1 Then
Me.combo2.RowSource = "SELECT ID, Description FROM tblRefAgency
End If
If the 2nd combo is bound to a field, you will also have to set the combo in the current event to ensure that data is displayed properly.