Form = Query issue

Keiath

Registered User.
Local time
Today, 20:56
Joined
Jan 6, 2012
Messages
104
On My Form I have a button controlled by a macro that returns a result of 'active' - 'Keith' = Number of forms with these.

When I click the button it only shows the forms to the above - works fine

Now on the form I want a box that displays the total number of forms that are 'active' and asigned to 'Keith' (Yes i know asigned is incorrectly spelled)

I created a query that counts the active and keith which is returning the right answer (2 in this case)

Query Name = CountCoSec

I have this

=DLookUp("[CountOfAsigned To]","[Asigned To]='Keith")

=DLookUp("[CountOfAsigned To]","Count","[Asigned To]='Keith'") have also tried this
and when I try this
=DLookUp("[CountCoSecOfAsigned To]","CountCoSec","[Asigned To]='Keith'") is flashes


But i keep getting an error in the box - what am I doing wrong?
 
Last edited:
This is another way

in the control source of a field

=DCount ("asigned to"," Name of query","asigned to = 'keith' ")
 
This is another way

in the control source of a field

=DCount ("asigned to"," Name of query","asigned to = 'keith' ")

in the control source of which field?
 
create a new field and see if it produces the result you desire , I notice you mentioned count of forms this method counts the records .
 
create a new field and see if it produces the result you desire , I notice you mentioned count of forms this method counts the records .

I tried creating a new field on the form didn't work i assume this is what you meant?
 
resolved

=DLookUp("[CountOfAsigned To]","CountCoSec","[Asigned To]='Keith'")
 
Please you managed to solve it your way ,I have attached a demo to illustrate Dcount , or did i completely miss the point you were trying to achieve ? Please comment .
 

Attachments

Users who are viewing this thread

Back
Top Bottom