If the query yields one record, perhaps a dlookup(“Supervisor”,”qryMaxCompensatory”)
?
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, July 31, 2014 1:40 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Query reference question
Jim-
When you use a reference like [Forms]![MyForm]![SomeControl], you are asking Access to go to the Forms collection (all open forms), find the form named “MyForm”, then use the value in the control named “SomeControl”. There is no such thing as a Queries collection, so your reference dies with the very first part.
What is it you’re trying to do? Reference a value in another open query? Perhaps bind the query to a Form, then use the [Forms] syntax.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Jul 31, 2014, at 3:21 PM, Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Hello,
I am trying to use a reference from a query like a Form reference. But what I am using is not working. I am getting a prompt for Queries. Is there something missing.
Thank You
=[Queries]![qryMaxCompensatory].[Supervisor] & "" & "Supervisor"
Jim Wagner
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |