Topics Search

Combobox filter

Combobox filter
Views: 90
Im having problems with the syntax,

Can someone just point me to a simple VBA example of a combobox with list values that filter a form on the value selected in the combobox.

The combobox is on the form its suppoused to filter
Sponsored Links:

More topics


Combo Box Filter

I am using a combobox filter on a mainform which has a subform.

I need to populate a combobox filter on a subform based on what is selected on a filter combobox on my mainform but no matter what I try I can't seem to get this to work.

I can populate the combobox filter on the subform using a normal combobox on that same form but can't populate the combobox filter on the subform using the filter on the main form.

I am aware that there is different syntax used to access a control on a subform and am 100% sure my syntax is perfect.

Dynamically set the row source of a combobox???

I have a combobox filter on a mainform. I have a combobox filter on a subform - the values of which are derived from a hard coded query.

Is it possible to change the row source of the subform combo based on what is clicked on in the mainform combobox filter? I also want to be able to clear the combo's rowsource completely - when add new record is clicked.

Filter ListBox with ComboBox?!

I need to have a comboBox which will filter listBox. I have create a query, relationship, and put AfterUpdate VB code on comboBox. But wont work, and listbox getting a blank values

Combobox to filter report

I have a report based on a query. I have a form with a combobox(Combo5) that lists all the customers that have been entered tickets into our system.

All I want is to select a customer from the combobox, click the cmd button(CustomerSearchCommand) and have the report (CustomerSearchRa) filter the report to the value in the combobox(combo5)

In trying different things I've gotten confused on what my original code was for this command button.

Filter by comboBox value

I'm working a form with filter by comboBox, my purpose is that after the comboBox updated, the form will show related data. See attached picutre, the code I wrote is

Private Sub Combo9_AfterUpdate()
Form.filter = "RepairID = '" & Me.Combo9.Value & "'"
Form.FilterOn = True

End Sub

There's something wrong, the filter did not work.
Could somebody give me some suggestion?

Form ComboBox Filter - Select ALL records

I'm trying to filter records on a form with a ComboBox, and I want the option to return ALL records.
My Form is: frmReview
My ComboBox is: cmbGLimpact
The RowSource is: SELECT DISTINCT [GLimpact] FROM Initiatives UNION SELECT Null As AllChoice FROM Initiatives ORDER BY [GLimpact] DESC;
The Query Criteria is: [Forms]![frmReview]![GLimpact]
The field values are: Yes, No & TBD

The filter works fine for Yes, No & TBD, but the blank choice doesn't return all records.

I need to be able to setup several filter ComboBoxes to enable filtering on several different fields. So, depending on which ComboBox filter (field) the user wants to filter on, the otherswill allow all records to be returned.

Help Creating Form

I have 5 tables: Manufacturers, Products, Brands, Varieties, Sizes.

I would like a combobox Manufacturer that would filter a Products combobox that would in turn filter a Brands combobox. After selecting a Brand from the Brand combobox, I need to enter several Varieties for each Brand and several Sizes (Size, Unit, Pkg) for each Variety.

How to filter form when value selected from combobox is null?

I have a combobox which has null as a valid value.I want the form to get filtered when user selects null as a value also.However no filtering happens when the value is null.I would liketo know is whether it is possible to filter if the record selected is null as the filter criteria will be empty string then?I am not posting any code as my question is just that can criteriabe null and still filter?

Combo Box Filter Not working in View mode.

I have a standard combobox filter that filters a forms records based on the name that is selected in it. The form can be opened in Add, Edit and View mode.

The combobox filter does not work in View mode though - is there any way to fix this?

Filter subForm comboBox based on main form combobox selection - SAMPLE ATTACHED

Here is my problem. I am trying to filter a combobox on a subform based on a combobox on my main form. I am successfully able to do this with two combo boxes on the same mainform but not with one on the mainform and one on the subform. I have attached a sample database with the tables, queries, and forms associated with this issue.

I have read numerous topics on this site relating to this topic and I have tried all the responses but I just keeping getting lost in the middle of the