I am programming a multi-criteria filter in an Access Data Page. I successed to make a simple criteria filter using the code below:
(the code is on a button click action)
Expand|Select|Wrap|Line Numbers
- MSODSC.DataPages(0).Filter = "Status= '" & SSTATUS.value & "'"
- If MSODSC.DataPages(0).IsFilterOn then
- ' If the filter is on, turn it off.
- MSODSC.DataPages(0).IsFilterOn = false
- else
- ' Otherwise, turn it back on.
- MSODSC.DataPages(0).IsFilterOn = true
- end if
Expand|Select|Wrap|Line Numbers
- MSODSC.DataPages(0).Filter = "Status= '" & SSTATUS.value & "'" and "Related= '" & SRELATED.value & "'"
- If MSODSC.DataPages(0).IsFilterOn then
- ' If the filter is on, turn it off.
- MSODSC.DataPages(0).IsFilterOn = false
- else
- ' Otherwise, turn it back on.
- MSODSC.DataPages(0).IsFilterOn = true
- end if
Thanks a lot for your help and if you need more information please let me know.