Sum & Count on Form.
On Thu, 20 May 2010 00:26:01 -0700, Chiki
wrote:
Ok.Sorry if i had missed anything.
I had created a table named EMP. The Table consists of the fields:-
Emp id-Autonumber
Employee Name-Text
Date of Joining-Date/time
Days worked-Number
Amount Earned-Currency.
On the form,i had created the combo box named:Employee Name
and text boxes named;Date of Joining,amt earned & Days worked.
Please tell me now what to change in my code;
Set the Control Source property of the textbox [amt earned] to
=DSum("[Amount Earned]", "[EMP]", "[Emp id] = " & [Employee Name])
This assumes (again, perhaps incorrectly, I don't know) that the Employee Name
combo box is displaying a name but has the Emp ID as its control source and
bound column.
--
John W. Vinson [MVP]
|