Hey Mike
Maybe this will do it; you can call this function from within a query:
Global keepdata as long ' this line in declaration section
Public Function testdup(indata as long) As long
If indata <> keepdata Then
keepdata = indata
testdup = indata
Else
testdup = 0
End If
End Function...
If I'm not mistaken, the criteria you mentioned at the outset will only give you records where both the Admission date and the close date fall within the desired period. (Or records where one or the other or both is null).
Try this; verify that you are in fact getting dates that begin before...
So then I figured, that that might not be all that clear, soooo . . .
you can put this expression in a query:
datepart("m",[somedate])-6 + iif(datepart("m",[somedate])-6<1,12,0)
substitute your date field's name for the word 'somedate' in both places. And adjust the 6 in...
For us our fiscal year starts in July, so to find out the fiscal month you just need to subtract 6 from the month (which makes July the first month). If you wind up zero or below you add 12. January (1)-6 = -5 +12 = 7. January is our 7th fiscal month.
That's how to calculate the fiscal month.
Three ideas come to mind quickly:
1) you would have to write the following function
public function countrecs(FileName as string)
dim cnt%,l$
open FileName for input as #1
cnt=0
do until eof(1)
line input #1,l
cnt=cnt+1
loop
close 1
countrecs=cnt
end...
I've dealt with this same problem, here's the solution:
(BeginDate<= #12/31/02# or BeginDate is null) and (EndDate>=#1/1/02# or EndDate is null)
If it looks backwards to you, that's because it is. You check the begin date against the end of the date range you want and you check the end date...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.