• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 394
  • Last Modified:

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!

  • 2
1 Solution
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])
There's good relevant information and explanations by Jim Dettman in his article on DLookup and the Domain Functions here:

(if the article is helpful to you, vote 'yes' on it)
NoeroAuthor Commented:
Quick, Clear, Efficient: Thank you!

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now