DLookUp for Memo field

B

Brad Fruhauff

I'm creating a catalog of library materials wherein the material description,
or [Notes], is a memo field in table [tbl_Material]. Sorting by First in the
underlying query [qry_LibraryCatalog] doesn't solve the 255-char chop
problem, so I'm trying DLookUp in either the query or the report. I'm trying
to grab all [Notes] fields from [tbl_Material] where the [MaterialId] for the
record matches the [MaterialId] in the underlying query, which draws from
[tbl_Material], the lookup table [Z:Type], and the lookup table [Z:Category]
via join table [jtbl_MaterialCategory].

The report lists materials by [Category], giving their [Title] and [Notes],
among other string type fields.

I've been trying to enter versions of the following into the Control Source
for an unbound text box:
=DLookUp("Notes","tbl_Material","MaterialId = " &
qry_LibraryCatalog.MaterialId)

Also:
=DLookUp("Notes","tbl_Material","MaterialId = " &
Reports!rpt_LibraryCatalogByCategory.MaterialId)

Most of the time the report either gives me a Parameter box for, say
qry_LibraryCatalog, or just stops up the whole program.
 
D

Duane Hookom

DLookup() will return the Notes from only one record. If MaterialId is in
the report's record source and it is a numeric field, try this:
=DLookUp("Notes","tbl_Material","MaterialId = " & MaterialId)
 

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

Similar Threads


Top