DLookUp in subform question

R

rpbsr

I'm working with a subform that lists courses, tuition, discount, etc. The
courses field uses a combo box to choose the course and I've just learned
here to use a DLookUp to calculate the discount based on income & family
size. I thought it may be appicable (and simpler) to use this to bring in the
tuition (from tblCourses or qryCourses). I've tried both based on the
following:

=DLookUp("[Tuition]", "qryCourses", "[CourseID] = Form![CourseID]")

It does work. And I can use it to calculate Final Tuition using the discount
in the form. However, the tuition control says "This control has a reference
to itself". Is this a problem? Is there a better way?

Thanks.
 
K

Ken Sheridan

You can change the name of the control to txtTuition to avoid the
self-reference.

Ken Sheridan
Stafford, England
 
R

rpbsr

Thanks Ken, I always try self-help first, but I'm glad you're there.
Robert

Ken Sheridan said:
You can change the name of the control to txtTuition to avoid the
self-reference.

Ken Sheridan
Stafford, England

rpbsr said:
I'm working with a subform that lists courses, tuition, discount, etc. The
courses field uses a combo box to choose the course and I've just learned
here to use a DLookUp to calculate the discount based on income & family
size. I thought it may be appicable (and simpler) to use this to bring in the
tuition (from tblCourses or qryCourses). I've tried both based on the
following:

=DLookUp("[Tuition]", "qryCourses", "[CourseID] = Form![CourseID]")

It does work. And I can use it to calculate Final Tuition using the discount
in the form. However, the tuition control says "This control has a reference
to itself". Is this a problem? Is there a better way?

Thanks.
 

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

Top