dynamic criteria discussion

  • Thread starter Thread starter Justin Kapacinskas
  • Start date Start date
J

Justin Kapacinskas

Hi,

Can anyone direct me to a discussion on using dynamic
criteria in Access 97 queries? Specifically I'm interested
in the in's-and-out's of using functions as criteria.

My specific problem involves a query, call it qryProblem,
with a number field, call it lngNumber, that I want to
specify dynamic criteria for using a function to build the
criteria (e.g. have the function return criteria such
as "Not 13 and Not 14" based on other arbitrary -- and
complicated -- conditions) or, conversely -- and this is
also stumping the heck out of me -- return no criteria or
some other arbitrary criteria that always evaluates to
true.

The problem seems to stem from the fact that I return a
string from the function as criteria -- when the field's
type is Number -- but I cannot for the life of me figure
out how to circumvent that.

I appreciate any feedback.

Thanks,
Justin
 
I was hoping to avoid that since it seems like SQL can be
harder to maintain than saved queries

ummm... saved queries ARE SQL. The query grid is just a user tool to
help build SQL; the query itself *is* the SQL string.
 
Back
Top