Dcount as control for text box

Hi,

Can anyone help on the below Dcount code as we are receiving an error or ?Name??:banghead:

=DCount("[STATUS]", "sheet1", "[PROCESSOR] = '" & Me.Text57 & "' AND [STATUS] = 'YTB'")
 
first inspect table/query sheet1, if
you have STATUS, PROCESSOR fields.

check your form if you have Text57
textbox.
 
Unlikely but is processor a number field?
 
Thanks for replying!

Sheet1 is the Table and Status & Processor are the fields in the table.

Also, these Status and Processor are available on the form. Status value always remain same, but processor value change.

For Example: Status = YTB, Processor = Alex, Xing, Chan

If Alex has 10 YTB records, the count should display for 10 only and not for the other. If Chan Processor there, then it should display Chan count only.

Please advise!!!
 
For a test, replace me. Text57 there with actual name, ie. "Alex" and see if you got something. If you did, text57 is wrong.
 
Thanks for the advise! If I tried with "Alex" I'm getting the result, but I have only one processor form and getting the Alex count to all other when there is a processor name change.

Can't it be changed automatically when there is a processor change in the field.

I have total 4 processors, for each processor we have their own dashboard where it is connected to "Processor form". If all are opened their database at a time, they will see only Alex count their instead of their own count by using this scenario.

I'm trying this from last one week, can anyone please help me out.
 
Check the correct textbox name. Trmove the Me. From your dlookup and instead enclosed in variable in sqr bracket:

[Text57]
 
How did you do it?
 

Users who are viewing this thread

Back
Top Bottom