A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Attach a query to an Unbound text box



 
 
Thread Tools Display Modes
  #1  
Old October 4th, 2006, 01:13 AM posted to microsoft.public.access.forms
Rob
external usenet poster
 
Posts: 1,029
Default Attach a query to an Unbound text box

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.
  #2  
Old October 4th, 2006, 01:43 AM posted to microsoft.public.access.forms
John Vinson
external usenet poster
 
Posts: 4,033
Default Attach a query to an Unbound text box

On Tue, 3 Oct 2006 17:13:01 -0700, Rob
wrote:

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]
  #3  
Old October 4th, 2006, 04:45 PM posted to microsoft.public.access.forms
Rob
external usenet poster
 
Posts: 1,029
Default Attach a query to an Unbound text box

It worked!! Thank you!!!

"John Vinson" wrote:

On Tue, 3 Oct 2006 17:13:01 -0700, Rob
wrote:

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]

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.