[AccessD] Function in query as criteria

Henry Simpson hsimpson88 at hotmail.com
Fri Feb 14 12:40:00 CST 2003


Then what you have to do is scroll the query window to watch it run as 
values come into the display scope.  Then check how it runs with compound 
criteria such as:

fldValue > 500 And fldValue < 800 And MyFunction(Field3, Field4)

Then see if it runs with OR criteria where there is a simple range criteria 
that can qualify it without running the function.  Does it even run once if 
the other criteria preclude inclusion in the result set?

There is much to learn about how queries run when you 'step through' them.  
Although there is little reference information on how this all works, it is 
always illuminating to watch through the windows we have on the processes.  
To mix a few threads, once you know how to fish, you may live in a coloured 
house, and though starvation for knowledge may be thwarted, I wonder whether 
you might be German, though it is not germane.

Hen

>From: "Mark Whittinghill" <mwhittinghill at symphonyinfo.com>
>Reply-To: accessd at databaseadvisors.com
>To: <accessd at databaseadvisors.com>
>Subject: Re: [AccessD] Function in query as criteria
>Date: Fri, 14 Feb 2003 11:25:53 -0600
>
>Hey,  that was an obvious way to find out :-)
>
>The answer is it only runs once.  Thanks for the advice.
>
>
>Mark Whittinghill
>Symphony Information Services
>Minneapolis, Minnesota
>Email: mark at symphonyinfo.com
>Phone: 612-333-1311
>----- Original Message -----
>From: "Henry Simpson" <hsimpson88 at hotmail.com>
>To: <accessd at databaseadvisors.com>
>Sent: Friday, February 14, 2003 11:04 AM
>Subject: Re: [AccessD] Function in query as criteria
>
>
> > Why don't you place a break point in the function and tell us?
> >
> > Hen
> >
> >
> >
> >
> > >From: "Mark Whittinghill" <mwhittinghill at symphonyinfo.com>
> > >Reply-To: accessd at databaseadvisors.com
> > >To: "AccessD" <accessd at databaseadvisors.com>
> > >Subject: [AccessD] Function in query as criteria
> > >Date: Fri, 14 Feb 2003 10:50:31 -0600
> > >
> > >Hi all,
> > >
> > >   I am writing an Access query which uses a VB function such as:
> > >
> > >SELECT Field1, Field2, MyFunction(Field3, Field4) AS CalculatedField
> > >FROM MyTable
> > >WHERE MyFunction(Field3, Field4) > 0
> > >
> > >Will MyFunction have to run twice for this query, once for
>CalculatedField,
> > >and once for the WHERE?
> > >
> > >TIA
> > >
> > >
> > >Mark Whittinghill
> > >Symphony Information Services
> > >Minneapolis, Minnesota
> > >Email: mark at symphonyinfo.com
> > >Phone: 612-333-1311


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the AccessD mailing list