Text Box

M

Martin

I have a report linked to a table tblMain. Is it possible to insert a text
box but have the text box pull information from a query that I've created
(qrySample)? If so, what would be the appropriate syntax in the control
source?
 
F

fredg

I have a report linked to a table tblMain. Is it possible to insert a text
box but have the text box pull information from a query that I've created
(qrySample)? If so, what would be the appropriate syntax in the control
source?

If the query returns just one record.....
=DLookUp("[FieldName]","qrySample")

If the query returns more than one record, you will need to add a
where clause to the above to find the correct record.
=DLookUp("[FieldName]","qrySample", "Where clause here")
See Access help on DLookUp().
 
Top