Control source

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I cannot use any expression in the control source property to disply the
value of a certain object in a atable especially the command DCount
please advice
 
I cannot use any expression in the control source property to disply the
value of a certain object in a atable especially the command DCount
please advice

Please post the expression you're trying to use, and the error that
you're getting. One possibility is that you're seeing the very common
References bug. Open any module in design view, or open the VBA
editor by typing Ctrl-G. Select Tools... References from the menu. One
of the .DLL files required by Access will probably be marked MISSING.
Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

John W. Vinson[MVP]
 
Dear John,
here's the exact thing i'd like to do

what should i write in the controlsource of a text box on a form to disply
the total of the agents whose skills are "TSLM" and shift "9:00" on the date
that equals the Form's date ,based on the below query

Date Shift Skills Total of agents
 
Dear John,
here's the exact thing i'd like to do

what should i write in the controlsource of a text box on a form to disply
the total of the agents whose skills are "TSLM" and shift "9:00" on the date
that equals the Form's date ,based on the below query

Date Shift Skills Total of agents

I know nothing about your form... is it based on this query? or
another query? Is it a single form or a continuous form?

The literal answer to your question would be to set the Control Source
of the textbox to something like

=DCount("*", "[tablename]", "[Skills] = 'TSLM' and [Shift] = #09:00#
And [Date] = #" & txtDate & "#")

assuming you have a textbox on your form named txtDate.

Note that Date is a bad choice of fieldnames, it's a reserved word.

John W. Vinson[MVP]
 
Dear Mr. John,

I'd like to thank you very very much for your help,I tried the below
mentioned command and it works very well,I'd like just to know the meaning
and the referance of some characters like (# and &) so I need a little bit of
explaiation about the command that you sent me :
=DCount("*", "[tablename]", "[Skills] = 'TSLM' and [Shift] = #09:00#
And [Date] = #" & txtDate & "#")

Thank you
Best Regards


John Vinson said:
Dear John,
here's the exact thing i'd like to do

what should i write in the controlsource of a text box on a form to disply
the total of the agents whose skills are "TSLM" and shift "9:00" on the date
that equals the Form's date ,based on the below query

Date Shift Skills Total of agents

I know nothing about your form... is it based on this query? or
another query? Is it a single form or a continuous form?

The literal answer to your question would be to set the Control Source
of the textbox to something like

=DCount("*", "[tablename]", "[Skills] = 'TSLM' and [Shift] = #09:00#
And [Date] = #" & txtDate & "#")

assuming you have a textbox on your form named txtDate.

Note that Date is a bad choice of fieldnames, it's a reserved word.

John W. Vinson[MVP]
 

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

Similar Threads

Dont understand Immediate windows ? 11
Access MS Access DCount function problem 0
DCount and IIf function 10
DCount 4
Access Dcount function in access 0
Access Dcount (multiple criteria) 3
Access Create option group without using wizard? 2
DCount in Text box from a parameter query 4

Back
Top