Q
quaddawg via AccessMonster.com
I am having a peculiar (to me) problem that does not happen all the time.
On a subform in data sheet view the first box is an unbound box (not a tab
stop) with the following function:
=IIf([End Date] Is Null And [StartDate] Is Not Null,"Active", IIf([End Date]
Is Not Null And (Format([End Date],"yyyymm"))>=Format(Date(),"yyyymm"),
"Active", IIf([End Date] Is Not Null And (Format([End Date],"yyyymm"))
<=Format(Date(),"yyyymm"),"Inactive"," ")))
*It's gone through many iterations as I try to diagnose the problem (e.g.,
the final " " is new but makes no difference. Also, the perhaps superfluous
"Is Not Nulls" are a result of diagnosing the problem).
If I start to add a new record in the subform datasheet by entering anything
in any of the other datasheet fields, a new line for a new record pops up (as
usual) and the box with the function above reads #Error. If I fill in that
line, it reads properly and the next new line that pops up has the error
message.
Strangely enough, this does not always happen, which leads me to think that
the problem might be more than just the poorly written function above.
Any suggestions? If Nz is one, please tell me where to put it/them, as I've
tried tons of combinations to no avail.
On a subform in data sheet view the first box is an unbound box (not a tab
stop) with the following function:
=IIf([End Date] Is Null And [StartDate] Is Not Null,"Active", IIf([End Date]
Is Not Null And (Format([End Date],"yyyymm"))>=Format(Date(),"yyyymm"),
"Active", IIf([End Date] Is Not Null And (Format([End Date],"yyyymm"))
<=Format(Date(),"yyyymm"),"Inactive"," ")))
*It's gone through many iterations as I try to diagnose the problem (e.g.,
the final " " is new but makes no difference. Also, the perhaps superfluous
"Is Not Nulls" are a result of diagnosing the problem).
If I start to add a new record in the subform datasheet by entering anything
in any of the other datasheet fields, a new line for a new record pops up (as
usual) and the box with the function above reads #Error. If I fill in that
line, it reads properly and the next new line that pops up has the error
message.
Strangely enough, this does not always happen, which leads me to think that
the problem might be more than just the poorly written function above.
Any suggestions? If Nz is one, please tell me where to put it/them, as I've
tried tons of combinations to no avail.