list box on form Dcount

ypma

Registered User.
Local time
Today, 19:13
Joined
Apr 13, 2012
Messages
643
Assistance required, currently I am using a list box on a form to count the records in status Offered, this works fine. As below :
=DCount("Status","StatusForSwitchboard","Processor = 'Joe Bloggs' AND Status = 'Offered' ")

I wish to have the count to include another status is this case Revised Offer.
How do I add it to the formula? any assistance or pointers would be appreciated
Regards Ypma
 
Add it as
Code:
=DCount("Status","StatusForSwitchboard","Processor = 'Joe Bloggs' AND (Status = 'Offered'  OR Status = 'Revised Offer')")
Note the use of the brackets to ensure the evaluation of the OR clause before the AND, assuming that is what you were after?
 
Minty ,thank you for getting back to me so quickly. I seem to get a zero . when running the formula,
=DCount("Status","StatusForSwitchboard","Processor = 'Joe Bloggs' AND (Status = 'Offered' OR Status = 'submitted')")

I was hoping for a total of the two combined. and if 1 was zero the count of the other one.I am using a text box not a list box that I put in my post 1.

Any further advise ?

Regards Ypma
 
=DCount("*","StatusForSwitchBoard","Processor='Joe Bloggs' And Status='Offered'") + DCount("*","StatusForSwitchBoard","Processor='Joe Bloggs' And Status='submitted'")
 
Arnelgp thank you for you input. I follow your formula and hopefully it will work . Will test it tomorrow.
Regards Ypma
 
Arnelgp:Thank you, with a few minor changes I got the formula to work.

and is as follows:
#=DCount("Status","StatusForSwitchboard","Processor = 'Joe Bloggs' AND Status = 'Offered' ")+ DCount("Status","StatusForSwitchboard","Processor = 'Joe Bloggs' AND Status = 'Submitted' ")#

I omitted the "*" not sure why that did not work for me.

Regards Ypma
 
Last edited:

Users who are viewing this thread

Back
Top Bottom