Are you *sure* it is that expression and not any other that is causing
the
error? I just tried something very similar, the only difference is that I
was using the Orders table from the Northwind sample database for
testing,
so I used the OrderDate field in place of your PaymentDate field ...
=IIf([OrderDate]<Date(),"Overdue",Null)
This works for me.
What if you delete that textbox from the report. Does the error go away?
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible
for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
Neil Greenough said:
I am trying to enter the following in a new unbound text box in a
report:
=IIf([PaymentDate] < Date(), "Overdue", Null)
PaymentDate is the exact name of one of my fields. All I did was inserted
a
new text box, clicked on properties and then pasted the above statement in
the Control Source.
Nonetheless, when I try this I keep on getting the following error:
"The function you entered can't be used in this expression:
*You may have used a DoEvents, LBound, UBound, Spc or Tab Function in
an
expression
*You may have used an SQL aggregate function, such as Count, in a
design
grid or in a calculated control or field.
On Thu, 7 Oct 2004 15:48:23 +0000 (UTC), Neil Greenough wrote:
I have a database report listing payments which are due to be received.
The
listed items are company which needs to pay, amount, due date and a
tick
box
for if received.
Now what I would like to create is another column. If the current date
is
passed the due date, then I would like the word "overdue" to appear in
a
final column.
How would I go about creating this? Can I create it in the actual
report?
Could people please give me a dummies guide to doing this as I am
not
all
that 'au fait' with Access.
You could do this directly in the report.
Add an unbound control to the report.
Set it's Control source to:
=IIf(Date()>[Due Date],"Overdue","")