Link to home
Start Free TrialLog in
Avatar of Noero
Noero

asked on

Add Sum to an item (see file)

Hello guys


In a formular, frmCourseMain, I just want to add a textbox (SUM in red in the file) which contains the sum of the fees of the student registered for the course chosen.
I made a simple request  SumFeesOfCourse, and I dont know how to link this with the textbox in order to screen a correct result.
I think my understanding of how to link is not proper...

Thanks in advance for explanation!

example.mdb
Avatar of mbizup
mbizup
Flag of Kazakhstan image

You can't "link" directly to your query in the control source of your textbox.  You need to lookup the value.

This will give you the sum for the CourseID of the current record on your main form:

=DLookUp("SommeDeFees","SumFeesForCourse","CourseID = " & [CourseID])
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Noero
Noero

ASKER

Quick, Clear, Efficient: Thank you!