I have a form with four comboboxes at the top used to filter the form, each one works independantly, now I want them to work in conjunction, for example:
MessageDate, IDOCStatus, SystemStatus and ActionOn are the four fields.
The code below allows me to filter using one combobox at a time:
BEGIN CODE
Me.Filter = "IDOCStatus = " & Me.cboSystemStatus & ""
Me.FilterOn = True
End Sub
END CODE
Now I would like to choose a value from the MessageDate Field that may return 60 records. Out of those 60, if 15 are in 'pending' IDOCSTATUS, I would then like to choose 'pending' from the IDOCSTATUS combobox and have it return only records with the specified date AND with status Pending. I would like to be able to choose any combination of these four boxes to filter the form.
I know I need to dynamically set the filter string, I started with If statements and got stuck on the 'null' issue.
MessageDate, IDOCStatus, SystemStatus and ActionOn are the four fields.
The code below allows me to filter using one combobox at a time:
BEGIN CODE
Me.Filter = "IDOCStatus = " & Me.cboSystemStatus & ""
Me.FilterOn = True
End Sub
END CODE
Now I would like to choose a value from the MessageDate Field that may return 60 records. Out of those 60, if 15 are in 'pending' IDOCSTATUS, I would then like to choose 'pending' from the IDOCSTATUS combobox and have it return only records with the specified date AND with status Pending. I would like to be able to choose any combination of these four boxes to filter the form.
I know I need to dynamically set the filter string, I started with If statements and got stuck on the 'null' issue.