Text Box

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

Guest

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?
 
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().
 
Back
Top