Custom function as criteria?

Timtropolis

Registered User.
Local time
Today, 18:36
Joined
Jun 17, 2004
Messages
84
G'day gang,

I have a query that I'd like to use in conjunction with a DAO recordset created via a procedure. I'm basically scrolling thru records in the procedure, obtaining an id number, setting it to a variable and then passing it along to the query. The variable has been set as "public".

In the query, I have the criteria set to the function name in the IDnumber field . Everything works (no error messages) but the query yields no records.

I've also verified that I set the variable in the procedure to the correct data type. I've even taken the extra step to simplify and just set the variable to hard value and then pass it back to the query but i get the same results. Anyone got any suggestions?

TIA
Timtropolis
 
What happens if you HARDCODE a the same value in the criteria?
 
if I hard code the value, the query works fine
 
Did you try calling the variable in the immediate window when you get no records in the query?
 
Timtropolis said:
G'day gang,

I have a query that I'd like to use in conjunction with a DAO recordset created via a procedure. I'm basically scrolling thru records in the procedure, obtaining an id number, setting it to a variable and then passing it along to the query. The variable has been set as "public".
Does this mean you are linking the results of a query to the results of another/or table?
Or scrolling via a form and next/prev ? - if this is the case set the secondary display to be filtered via a combo/(hidden) textbox (your choice).

[/quote]
In the query, I have the criteria set to the function name in the IDnumber field. Everything works (no error messages) but the query yields no records.

I've also verified that I set the variable in the procedure to the correct data type. I've even taken the extra step to simplify and just set the variable to hard value and then pass it back to the query but i get the same results. Anyone got any suggestions?

TIA
Timtropolis[/QUOTE]

Is it definitely calling the sub/function? (breakpoint). The Function is public correct?


Vince
 

Users who are viewing this thread

Back
Top Bottom