T
Tom Jones
I've found great code by John Spencer in this NG for if/then query
solutions, which has turned out to be excellent for what I want to do.
However, I'd like to add one more functionality to his code, which I'm
having trouble doing--the ability to handle wildcards.
This question is part of a larger question on forms and queries passing
data between each other, in microsoft.public.access.forms in the thread
"Form data passed to querry".
The code I'm using is as follows. I've modified his "LIKE" to be an "=",
since neither "LIKE" nor "=" allow me to use "*" or "?" wildcards.
<CODE>
SELECT
DISTINCT ROW
Person.LAST,
Person.FIRST,
Address.ADDRESS_TYPE,
Address.STREET,
## -- etc ##
FROM Person INNER JOIN Address ON Person.UNIQUE_PERSON_KEY =
Address.UNIQUE_PERSON_KEY
Where (
((Person.LAST) = [forms]![person]![last] or [forms]![person]![last] is
null)
AND
((Person.FIRST) = [forms]![person]![first] or [forms]![person]![first]
is null)
);
</CODE>
Many thanks.
solutions, which has turned out to be excellent for what I want to do.
However, I'd like to add one more functionality to his code, which I'm
having trouble doing--the ability to handle wildcards.
This question is part of a larger question on forms and queries passing
data between each other, in microsoft.public.access.forms in the thread
"Form data passed to querry".
The code I'm using is as follows. I've modified his "LIKE" to be an "=",
since neither "LIKE" nor "=" allow me to use "*" or "?" wildcards.
<CODE>
SELECT
DISTINCT ROW
Person.LAST,
Person.FIRST,
Address.ADDRESS_TYPE,
Address.STREET,
## -- etc ##
FROM Person INNER JOIN Address ON Person.UNIQUE_PERSON_KEY =
Address.UNIQUE_PERSON_KEY
Where (
((Person.LAST) = [forms]![person]![last] or [forms]![person]![last] is
null)
AND
((Person.FIRST) = [forms]![person]![first] or [forms]![person]![first]
is null)
);
</CODE>
Many thanks.