!!!Desperate!!!

N

none

I have created a Function to create an 'In' Clause ex.In
('01','02','03'). I am using this Function in the criteria
section of a query but the query returns nothing..If I put
the result set of the query in the criteria results it
works fine. Can someone help me with this?

thnx
 
B

Bas Cost Budde

I have created a Function to create an 'In' Clause ex.In
('01','02','03'). I am using this Function in the criteria
section of a query but the query returns nothing..If I put
the result set of the query in the criteria results it
works fine. Can someone help me with this?

Why do you need a function? Would it be possible to have the values in a
table and join that one?
 
N

Norma

I don't really know what you wanting for the final
result. Have you tried using a datepart statement??
Hope it helps.

Norma
 
N

none

I have tried in a table and linking the table the problem
with that is that other tables are also linked and Ms
Access will only allow me to use an Outer Join thereby
defeating the purpose of using that table in order to
limit my results.

The Function would allow me to store those values in a
table, pull them out from 1 centralized source...bc we all
know things will change...that way I wont have to go back
once things change and change a couple of hundred queries.
 
B

Bas Cost Budde

I have tried in a table and linking the table the problem
with that is that other tables are also linked and Ms
Access will only allow me to use an Outer Join thereby
defeating the purpose of using that table in order to
limit my results.

Okay, not join then; but in the criteria line you can have subselects, like

in (select thevalue from thesmalltable)

(that may not be the optimal solution with respect to performance, but
if it works...)
The Function would allow me to store those values in a
table, pull them out from 1 centralized source...bc we all
know things will change...that way I wont have to go back
once things change and change a couple of hundred queries.

Well, the function-- er, *hundred* queries? That's a lot. What is going
on there?

You know that function calls in a query can slow the lot to a grinding halt?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top