DLookup misery

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form (TrailsDetail) that has a calculated control (TimeCalc). I
built a report (Trails) and would like to use the Dlookup function to grab
TimeCalc from the form TrailsDetail. Both share a common numeric key
(TrailID). For the life of me I can not get this to work:

DLookup("TimeCalc", "TrailsDetail", "TrailID = " &
forms!TrailsDetail!TimeCalc)

Can this be done?
 
I have a form (TrailsDetail) that has a calculated control (TimeCalc). I
built a report (Trails) and would like to use the Dlookup function to grab
TimeCalc from the form TrailsDetail. Both share a common numeric key
(TrailID). For the life of me I can not get this to work:

DLookup("TimeCalc", "TrailsDetail", "TrailID = " &
forms!TrailsDetail!TimeCalc)

Can this be done?

DLookUp returns a value from a specific field in a TABLE or a QUERY,
not from a form.

To return a calculated value from an OPEN form use, in an unbound
control on the report:

=forms!TrailsDetail!TimeCalc

The form must be open and that particular TrailID displayed as the
active record on the form.

If this is a report with many different TrailID records, you would
need to do the calculation in the report instead of on the form.
 
Back
Top