Hector Rodriguez
Hector Rodriguez

Reputation: 1

Set Value to a Report Textbox from a Query

I made a query that only shows me a single field and a single record from another query, how can I put that value in a textbox in a report?

The record I want to set is a date that I insert with a MsgBox.

I read that there are ways to just put in the Control Source "=[table]![field]" but I get the Name? error, another way I read but did not understand it is defining a recordset. I can't put the value to the textbox despite trying the ways I've read in other posts.

Upvotes: 0

Views: 136

Answers (1)

June7
June7

Reputation: 21370

One simple way is with DLookup() domain aggregate function expression in textbox. If field name has space or punctuation/special characters or is a reserved word, [ ] delimiters will be required. Usually table/query name does not but can't hurt.

=DLookup("[fieldname]","[tableORquery name]")

Upvotes: 1

Related Questions