Hi Anton
Sorry - new to this... I will try to be more
clear.
This is being done in a report - not a query
or a form. I simply want a report to print
out the complete list of herb names, section
by section.
Should look like this:
Section 2.1 Clear heat herbs <<< section header
2.1 HerbName1 << generated by detail
2.1 HerbName2 << section in the report
Section 2.2 Clear damp herbs <<< section header
2.2 HerbName3
2.2 HerbName4
2.2 HerbName5
etc
Initially I had problems with syntax and getting
this to work... soooo... I broke it down and
just used a constant value (1.1 or 2.1 - same
difference) in the lookup.
Thus in the report (section header) we find
the following:
Section [Section]
=DLookUp("[Herb_Category]","[tbl_HerbCategory]","[Section_number] = " &
2.1)
This correctly produces:
Section 2.1 Clear heat herbs
But since I want this to print correct section headers
for ALL herbs in the list... I made one
change in the DLookUp:
=DLookUp("[Herb_Category]","[tbl_HerbCategory]","[Section_number] = " &
[Section])
Replacing the 2.1 constant with [Section]
The section# prints/indexes correctly... but
the lookup which should print the English text
instead produces #ERROR.
I don't know why, and I don't know how to
debug further or fix it. I am stuck.
And yes, the report is bound to table: Herb_table.
The English text descriptions are found in
table: tbl_HerbCategory
Thank you so much for your help - I really
appreciate it.
ps. eventually I would like to do a prompt
and just print a specific section of
herbs (likr your example - I think), but
for now.. was just trying to generate
a "simple" complete report !
*** Sent via Developersdex
http://www.developersdex.com ***