Topics Search

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

How to filter form when value selected from combobox is null?
Views: 76
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?
Sponsored Links:

Similar posts...

 

Combo Box Filter

Combo Box Filter Icon
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.
 

Form ComboBox Filter - Select ALL records

Form ComboBox Filter - Select ALL records Icon
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.
 

form filter multiple combos

form filter multiple combos Icon
I have a form based on a table. On the form header I have two combos. My goal is to filter data displayed on the form based on the values selected on the combos and return all records if there are no values on the combos.

I.e. - filter the records based on the value selected in first combo box and if the value of the combo is null to display all the records.

if I select a value from the second combo to filter the records accordingly (keeping the filter of the first combo) and if the value of the second combo is null to display all the records (keeping the filter of the first combo if a value is selected).
 

Combo Box Filter Not working in View mode.

Combo Box Filter Not working in View mode. Icon
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?
 

ComboBox checking to see if value exists

ComboBox checking to see if value exists Icon
So I have created this combobox that requires the user to enter a password when selecting a value in my unbound combobox. If the password is incorrect then the combobox is cleared and is reset to the value it was before the update was attemped.

Now I found code on getting this to work and it works great except for one minor flaw that I am trying to add to it. If the user goes to clear the combobox thus making the value null the Msgbox appears asking for the users password but fails each time because the null username does not exist.

I'm trying to make theproper if statement to check and see if the username selected from the combobox does not exist in the usertable then it just cancels the update statement.

(between I did not make this code I borrowed it from another forum)
 

Using Filter by Form

Using Filter by Form Icon
I have a form (Access 2003) that I want to use Filter by Form on. There are over 50,000 records behind this form. When I use the dropdown lists beside the fields, it say is Null or is not null.

I know I have used filter by form before and the dropdown lists contain what is actually in the field. Is there anyway to get this data to appear instead of Is Null or Is not Null?
 

Cannot get values for a Combobox..

Cannot get values for a Combobox.. Icon
I am trying to retrieve the unique names from a table into the combobox on a form. I have the attached code for the command button on the form.

'Invalid use of Null'.

if I use another table for a string value for the same recordset, the code works and the combobox gets populated with the unique names of the field selected.

I tried to retrieve the values for different fields from the table tblPlants, but I get the same error.
It appears that I cannot populate the combobox with any of the field values from the tblPlants. But the values are not Null - by using the code line for the MsgBox (msg), I am able to see the values in the MsgBox.
Or is it some other criteria I am missing?
 

apply filters on a cross tab quiery froma combo box in a form

apply filters on a cross tab quiery froma combo box in a form Icon
I have a CrossTab Query,(Daily Sales Plan), I want filter only the model selected in a combo box in a form, I'm using this criteria : nz( Forms![Frm1_GeneralQuery]![ComboModel],"*") so, it would filter only the model selected in combobox and filter on my cross tab, but it not even let me save changes on the cross tab, a messaga comes out saying that access does not recognize this data as a valid name or criteria
 

Combobox to filter report

Combobox to filter report Icon
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.
 

cascade combobox problem.

cascade combobox problem. Icon
I have two comboboxes on a subform. The first combobox is used to populate the second combobox. These are placed in the detail section of the form.I want them to work this way:when I select any value from the first combobox,I want the second combobox of the same row to get populated by relevant value.

As of now, I have tried to implement this and as I select any value from the first combobox of row 1 I see the second combobox of the same row gets populated but as I go on selecting values from the first set of comboboxes I see that the values in the second set of the comboboxes above changing or becoming null.

The 1st combobox is cboRCMTask: