Attach a query to an Unbound text box

R

Rob

Is it possible to write an expression from a query in an unbound text box
when the form is set to a table or another query?
I have a form where the record source is set to qry production. I want to
create an unbound text box where the control source is an expression pulling
from another query. Here is the expression;=[qry KRP baseline]![Devanning]. I
am receiving a #NAME? error.
 
J

John Vinson

Is it possible to write an expression from a query in an unbound text box
when the form is set to a table or another query?

Not directly. You need to use either a Subform, or if there's just one
field, use DLookUp.
I have a form where the record source is set to qry production. I want to
create an unbound text box where the control source is an expression pulling
from another query. Here is the expression;=[qry KRP baseline]![Devanning]. I
am receiving a #NAME? error.

Try =DLookUp("Devanning", "[qry KRP Baseline]", "<optional
parameters>")

The parameters are needed if the query returns multiple records.

John W. Vinson[MVP]
 
R

Rob

It worked!! Thank you!!!

John Vinson said:
Is it possible to write an expression from a query in an unbound text box
when the form is set to a table or another query?

Not directly. You need to use either a Subform, or if there's just one
field, use DLookUp.
I have a form where the record source is set to qry production. I want to
create an unbound text box where the control source is an expression pulling
from another query. Here is the expression;=[qry KRP baseline]![Devanning]. I
am receiving a #NAME? error.

Try =DLookUp("Devanning", "[qry KRP Baseline]", "<optional
parameters>")

The parameters are needed if the query returns multiple records.

John W. Vinson[MVP]
 
Top