Data Sheet and Calculation

  • Thread starter Thread starter 123
  • Start date Start date
1

123

Thank you
If I have subform datasheet consist of detail and form footer
I want to put expression in form form footer section count number of
something where is condition..
For example:
record source for textbox =count [ID] where ID=5
is this possible
 
This might or might not work for you. Try it & see.

=sum (iif ([ID]=5, 1, 0))

HTH,
TC
 
123 said:
Thank you
If I have subform datasheet consist of detail and form footer
I want to put expression in form form footer section count number of
something where is condition..
For example:
record source for textbox =count [ID] where ID=5
is this possible


Possible, but it should be more like this:

=Abs(Sum([ID] = 5))

or without the tricks:

=Sum(IIf(ID = 5, 1, 0))

Or, If you prefer:

=Count(IIf(ID = 5, 1, Null))
 
TC
Marshall Barton
Thank you for your help and answer I have test all and this expression is
work
=Abs(Sum([ID] = 5))
thank you
Marshall Barton said:
123 said:
Thank you
If I have subform datasheet consist of detail and form footer
I want to put expression in form form footer section count number of
something where is condition..
For example:
record source for textbox =count [ID] where ID=5
is this possible


Possible, but it should be more like this:

=Abs(Sum([ID] = 5))

or without the tricks:

=Sum(IIf(ID = 5, 1, 0))

Or, If you prefer:

=Count(IIf(ID = 5, 1, Null))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top