Kim said:
-----Original Message-----
kim said:
I am trying to have a ticker at the bottom of form that
will perform a count on separate fields in the table. For
this example, I am trying to do a count on the due_date
field where the due_date is equal to today's date. Not
having much luck. The closest I have come up with is
=Count("[Aalst]![Due Date] =date()") which still returns
#error. Any ideas would be greatly appreciated.
You can do this by using the Sum() function on a conditional
expression involving a field in the form's recordsource. Like this:
=Abs(Sum([Due Date] = Date()))
I still get the error. Is this because this is my main
form that isn't linked to the other tables?
Probably. You haven't told me anything about your main form, any
subforms involved, or the table(s) being used as recordsources, so it's
hard to say for certain. You can only use an expression like that in
the header or footer section of a bound form whose recordsource includes
the field in question. Is the [Due Date] field on a subform? If so,
you would normally put the text box on the subform, not the main form,
though you could do that and have a text box on the main form that
actually picks up its value from the text box on the subform. But
you'll have to tell me more about how you have this set up before I can
give you more detailed advice.
The
expression builder for the control source shows me the
table. Or am I using the wrong type of field to do this?
The expression builder will let you build lots of expressions that may
be valid in some context, but not in the context in which you're trying
to use them. It doesn't pay to rely too much on the expression builder,
I'm afraid. It doesn't know what you're trying to do. As far as it
being the wrong type of field: I can't say, since you didn't say
anything about field types, but right now I doubt that that is the
problem.
More information, please.