From: rpbsr on
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.
From: Ken Sheridan on
You can change the name of the control to txtTuition to avoid the
self-reference.

Ken Sheridan
Stafford, England

"rpbsr" wrote:

> 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.

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

"Ken Sheridan" wrote:

> You can change the name of the control to txtTuition to avoid the
> self-reference.
>
> Ken Sheridan
> Stafford, England
>
> "rpbsr" wrote:
>
> > 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.
>