View Single Post
  #2  
Old March 3rd, 2010, 04:41 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Unable to use filter in datasheet view or add criteria to query in design view

HouBMan wrote:
I have a question regarding a custom function. The query results can't
be filtered nor can a criteria be used in the design window to filter/
restrict the records. The function returns the correct answer for all
the cases but I need the functionality to filter the results.

Here is purpose, input and output and example uses:

Purpose:
If given 2 dates, a month and a year, the function returns the number
of days that fall between the start and enddates, in the given month
and year.
Example 1,
My_Function(#1/1/2010#, #1/15/2010#, 1,2010) Returns 14
BTW - 14 is correct because the end date is not considered a full
day; another example:
My_Function(#1/1/2010#, #1/15/2010#, 2, 2010) Returns 0

Input:
StartDate As Date
EndDate As Date
intMonth As Integer
IntYear As Integer
Output:
Integer value

My problem:
The results in the query can't be filtered nor can a criteria be used
in the design window.



There is something wrong in the query. Poast back with a
Copy/Paste of the query's SQL view.

--
Marsh
MVP [MS Access]