Hello again, I'm still in the process of changing ms access queries to
Pass through queries. We're using a SQL Server 2000 database with an
Access 2000 DB as our front end.
I trying to convert this ms access query to a pass through and I'm
having quite a hard time doing it, so I hope you guys can help me. I
have a clients form and in this form there are 2 combo boxes where a
user can select a client's Type and Status. One for each. However, if
they don't need to choose anything, that field should be Null. Here's
the access query:
SELECT tblClients.Number, tblClients.Type
FROM tblClients
WHERE (((tblClients.Type)=[Forms]![frmClients]![CLType])
AND
((IIf(IsNull([Forms]![frmClients]![CLStatus]),((([tblClients].[Status])
Is
Null)),((([tblClients].[Status])=[Forms]![frmClients]![CLstatus]))))<>False))
OR
(((IIf(IsNull([Forms]![frmClients]![CLStatus]),((([tblClients].[Status])
Is
Null)),((([tblClients].[Status])=[Forms]![frmClients]![CLstatus]))))<>False)
AND (([Forms]![frmClients]![CLtype]) Is Null))
The IIF part in the criteria AND and OR is the same. Since I have to
check the value of the boxes first and the IS Null part cannot be equal
to False, I'm stuck. I know I can't use the boxes values all the way
through because SQL 2000 will not understand them, so I guess I have to
come up with something first before activating the pass through query.
Any help would be extremely appreciated.
Thanks.
JR.