Search code examples
sqlvbams-accesstextboxexpressionbuilder

How to display text from a query into a textbox


I have a textbox on my report and I have a query which always returns a single cell:

SELECT CustomMessage FROM OrderSheetSettings;

My aim is to display the single cell that it returns and place it into the textbox through the expression builder.

What I have/tried so far:

[qryCustomMessage]![CustomMessage]
[qryCustomMessage]![CustomMessage].Value

But this returns '#Name' or '#Error'

Any help on this would be great.

Thanks


Solution

  • =Dlookup("CustomMessage","OrderSheetSettings")