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: 60
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:

More topics

 

Combobox filter

Preview
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
 

Combo Box Filter

Preview
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.
 

Select a Null value in Unbound Combobox

Preview
Using Access 2010.
I've got an unbound combobox with a default value, but I still would like users to enter a Null value. I've got the Null value in the list of drop down items, but when it is selected, the combox value does not go to null, but instead goes to the default value.
Any easy way to allow null values to be selected? I know it was possible with older versions of Access, but not any more.
 

Form ComboBox Filter - Select ALL records

Preview
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

Preview
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.

Preview
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 or FindRecord in Split Form

Preview
I'm trying to use a unbound combobox with a ID and Name field (only displaying name) on a split form that will apply a filter or use findrecord in the afterupdate event of the combobox to go to the record in the split form selected by the combo box. Findrecord wasn't working,

[code]

But it prompts for the supervisor ID, even though the code shows that the value passed should be correct. If I manually enter the ID in the prompt, the filter applies as how I was expecting the code would work.
 

Filtering fields on a form with a combobox

Preview
Please can someone tell me how I can create a form with a combobox that causes certain fields in an associated subform to be hidden?

I know how to filter records in the subform using a query based on the combobox, but not how to filter the fields themselves.

I have a table like this:

Name Mo1 Mo2 Tu1 Tu2 We1 We2 Th1 Th2 Fr1 Fr2

For each name, a record can be marked as 'absent' or 'present' in the other fields.

I want a combobox that lists the days of the week, and if eg Monday is selected, the subform displays this:

Name Mo1 Mo2

(for each record)
 

Filter or FindRecord in Split Form

Preview
I'm trying to use a unbound combobox with a ID and Name field (only displaying name) on a split form that will apply a filter or use findrecord in the afterupdate event of the combobox to go to the record in the split form selected by the combo box. Findrecord wasn't working, so I tried filter using this code:

Private Sub Combo11_AfterUpdate()
Me.Filter = "Supervisor_ID=" & Me.Combo11 & ""
Me.FilterOn = True End Sub

But it prompts for the supervisor ID, even though the code shows that the value passed should be correct. If I manually enter the ID in the prompt, the filter applies as how I was expecting the code would work. Any insight
 

ComboBox checking to see if value exists

Preview
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)