I am repating this post
viewtopic.php?t=92268&highlight=routine+fix
as I tried my best to fix but no luck. So guys I need some help here.
Below is my routine and it works like a charm.(The database count field is '0' upto this point and I have to populate the values based on this routine results)
Code: Select all
If (CurrMCol <> PrevMCol) AND (CurrPCol <> PrvPCol) then
If StCode = '20' OR StCode = '29' then Count = 0
Else Count = 1
End
If (CurrMCol = PrevMCol) AND (CurrPCol = PrvPCol) Then
If (EffCurrDate = MaxPrevDate or EffCurrDate = MaxPrevDt + 1) then
If (StCode = '20' OR StCode = '29' ) then
If ( EntryDate >= StartDate and EntryDate <= EndDate) then Count = 1
Else If (MaxEndDt = EndDate) then Count = 0
Else If ( IsNull(EntryDate) or EntryDate = '') then Count = 0
End
End
End
Code: Select all
If (CurrMCol = PrevMcol and CurrPCol = PrvPCol) and
If (EffCurrDate <> MaxPrevDate or EffCurrDate <> MaxPrevDt + 1) then
IF Not(IsNull(EntryDate) then count =1 else count = 0
Else if (EffCurrDate = MaxPrevDate or EffCurrDate = MaxPrevDt + 1) then
if (StCode <> '20' OR StCode <> '29' ) then
If Not(IsNull(EntryDate) then Count = 1
Else count = 0
End
thanks