G
Guest
Hi, I have a form with 2 Text Box acting as control to filter data in a
query, however 3 of 4 possible combinations are working fine but the 4th one
it does not. The two text box are TxStreet (street name) and TxNo (Street
number). When I search by:
1) If I live both controls empty I dont' get any record, which is OK
2) Street number and Street name, the result is OK
3) Street number only, the result is OK
4) When I search by street name only I don’t get any record
So the 4th combination is my problem, I have tried several different
combination of criteria without lock. What I am doing wrong? This is what I
have in my query:
SELECT tblData.*
FROM tblData
WHERE (((tblData.Street) Like [Forms]![FrmSearch]![TxStreet] & "*") AND
((tblData.[No])=[Forms]![FrmSearch]![TxNo]));
query, however 3 of 4 possible combinations are working fine but the 4th one
it does not. The two text box are TxStreet (street name) and TxNo (Street
number). When I search by:
1) If I live both controls empty I dont' get any record, which is OK
2) Street number and Street name, the result is OK
3) Street number only, the result is OK
4) When I search by street name only I don’t get any record
So the 4th combination is my problem, I have tried several different
combination of criteria without lock. What I am doing wrong? This is what I
have in my query:
SELECT tblData.*
FROM tblData
WHERE (((tblData.Street) Like [Forms]![FrmSearch]![TxStreet] & "*") AND
((tblData.[No])=[Forms]![FrmSearch]![TxNo]));