P
Paolo
Hi,
I have a 8 column table column and a form with 8 text combo
boxes, one combo for each column. I want to filter my table
on the records that contains what the user type in the
combo boxes. These are the feautures:
1. I don't require that each combo matches exactly the
field in the respective column, but just any part of it.
2. If the user doesn't fill a combo it means that the combo
matches any value.
3 I want get back only the records that match all the 8
values in the combo boxes
This is what I wrote for the first and second column.
SELECT myTable.*, myTable.A, myTable.B
FROM myTable
WHERE ( (((myTable.A) Like "*" & Forms!myForm!myComboA &
"*") Or IsNull(Forms!myForm!myComboA) Or
((Forms!myForm!myComboA) Like "")) And
(((myTable.B) Like "*" & Forms!myForm!myComboB & "*") Or
IsNull(Forms!myForm!myComboB) Or ((Forms!myForm!myComboB)
Like "")));
This query seems to work good on Xp wit Access 2002, but it
doesn't work on Access 2000 on Win2000 an Access 97 on Win98.
There is something wrong in the query? There is something
difference about SQL on different Access version?
Thanks so much,
Paolo
I have a 8 column table column and a form with 8 text combo
boxes, one combo for each column. I want to filter my table
on the records that contains what the user type in the
combo boxes. These are the feautures:
1. I don't require that each combo matches exactly the
field in the respective column, but just any part of it.
2. If the user doesn't fill a combo it means that the combo
matches any value.
3 I want get back only the records that match all the 8
values in the combo boxes
This is what I wrote for the first and second column.
SELECT myTable.*, myTable.A, myTable.B
FROM myTable
WHERE ( (((myTable.A) Like "*" & Forms!myForm!myComboA &
"*") Or IsNull(Forms!myForm!myComboA) Or
((Forms!myForm!myComboA) Like "")) And
(((myTable.B) Like "*" & Forms!myForm!myComboB & "*") Or
IsNull(Forms!myForm!myComboB) Or ((Forms!myForm!myComboB)
Like "")));
This query seems to work good on Xp wit Access 2002, but it
doesn't work on Access 2000 on Win2000 an Access 97 on Win98.
There is something wrong in the query? There is something
difference about SQL on different Access version?
Thanks so much,
Paolo