renenger
08-17-2005, 11:21 AM
Ok. I think I have found a work around for my report. I created an unbound field in my report called ActCap.
If Me.Date < Date() Then
Me.ActCap = 0
Else
Me.ActCap = Me.PrdCap
End If
I can't get this to work in a report. Any ideas how to get this to populate in the report? This will help by utilizing this field for my report rather than PrdCap.
Thanks.
How about as an IIF statement in the underlying query?
somefield: IIf(expr, truepart, falsepart)
Datecheck: IIf (me.Date < Date(), 0, me.PrdCap)
WayneRyan
08-17-2005, 11:42 AM
Reneger,
If Me.Date < Date() Then
Date is a word reserved for use by MS Access. Naming your controls or
variables with reserved words will lead to unpredictable results.
Try changing that first.
Wayne
renenger
08-17-2005, 12:31 PM
I was able to get the running totals I need to by adding an IIF statement in the query. However, I have another problem.
They need to see Sat dates as well. Even though currently there is nothing scheduled against them. Saturdays are our makeup days and we try to catch up a little. So we want to see those in the running total. They are accurate if they are not in there.
However, if I show all dates in tblPrdCap, then it shows pasts dates that have no value. Somehow I need to eliminate these.
However, we have past dates that do have things scheduled against them that are done yet.
I'm stuck. Basically, if PrdDate > Date() and PrdCap > 0, I need it to show in the query. But also, if PrdDate < Date() and PrdCap >0 and WODD is not null, I need it to show.