Thanks for the help!
I have a to-do projects list database with different users, priorities, status, etc.
I have a form with comboboxes which I use to filter the content of a subform by priority, users and status. It works well and fast.
I want to add another combo box to further filter the SAME status field, but everything I have done does not work.
(Actually I was able to use filters and they gave me the right results, but filters make my database too slow, so I want to use a combo box instead which is much faster: is this possible?).
When ComboSTATUS1 is empty it gives me all records (that is for ANY value present in the field Status). But from this result I want to exclude the record which have the field Status = 'completed'.
I tried to insert a ComboboxSTATUS2 to exclude from the results the field with Status 'Completed' but it was interfering with ComboboxSTATUS1 which was no more working. Both ComboboxSTATUS1 and ComboboxSTATUS2 point on the same field 'Status'.
This is the query of the subform which use comboboxes to filter results:
SELECT Projects.*, Projects.ID, Projects.Number, Projects.[End Date], Projects.Status FROM Projects
WHERE (((Projects.Status) Like IIf(IsNull(forms!Startup!ComboboxSTATUS1),"*",forms!Startup!ComboboxSTATUS1))
And ((Projects.Owner) Like IIf(IsNull(forms!Startup!ComboboxOwner),"*",forms!Startup!ComboboxOwner))
And ((Projects.Priority) Like IIf(IsNull(forms!Startup!ComboboxPriority),"*",forms!Startup!ComboboxPriority)))
ORDER BY Projects.[End Date];
For clarity's sake I upload a sample database rup sample projects.zip.
I have a to-do projects list database with different users, priorities, status, etc.
I have a form with comboboxes which I use to filter the content of a subform by priority, users and status. It works well and fast.
I want to add another combo box to further filter the SAME status field, but everything I have done does not work.
(Actually I was able to use filters and they gave me the right results, but filters make my database too slow, so I want to use a combo box instead which is much faster: is this possible?).
When ComboSTATUS1 is empty it gives me all records (that is for ANY value present in the field Status). But from this result I want to exclude the record which have the field Status = 'completed'.
I tried to insert a ComboboxSTATUS2 to exclude from the results the field with Status 'Completed' but it was interfering with ComboboxSTATUS1 which was no more working. Both ComboboxSTATUS1 and ComboboxSTATUS2 point on the same field 'Status'.
This is the query of the subform which use comboboxes to filter results:
SELECT Projects.*, Projects.ID, Projects.Number, Projects.[End Date], Projects.Status FROM Projects
WHERE (((Projects.Status) Like IIf(IsNull(forms!Startup!ComboboxSTATUS1),"*",forms!Startup!ComboboxSTATUS1))
And ((Projects.Owner) Like IIf(IsNull(forms!Startup!ComboboxOwner),"*",forms!Startup!ComboboxOwner))
And ((Projects.Priority) Like IIf(IsNull(forms!Startup!ComboboxPriority),"*",forms!Startup!ComboboxPriority)))
ORDER BY Projects.[End Date];
For clarity's sake I upload a sample database rup sample projects.zip.