Attach a query to an Unbound text box

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

Guest

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.
 
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]
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top