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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access a subform in a query



 
 
Thread Tools Display Modes
  #1  
Old June 20th, 2008, 02:45 AM posted to microsoft.public.access.queries
Nigel
external usenet poster
 
Posts: 29
Default Access a subform in a query

What is the sysntax to refer to a subform in the conditions statement of a
query I tried the following

[forms]![orders]![subform].[orderdetail]![pricetable]

but that doesn't work

thanks
  #2  
Old June 20th, 2008, 03:55 AM posted to microsoft.public.access.queries
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default Access a subform in a query

There's a great explanation of Form/Subform Referencing on
www.mvps.org/access

HTH
--
-Larry-
--

"Nigel" wrote in message
...
What is the sysntax to refer to a subform in the conditions

statement of a
query I tried the following

[forms]![orders]![subform].[orderdetail]![pricetable]

but that doesn't work

thanks



  #3  
Old June 20th, 2008, 12:41 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Access a subform in a query

I'm not sure that you can reference a subform's controls in a query. As I
recall the expression service won't handle this.

I believe that what I have done in the past (long ago and far away) was to add
a control to the main form (visible = no) and either set the value of the main
form control from the subform or reference the sub-form control as the source
of the main form control.

All of this is based on my notably faulty memory.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

Nigel wrote:
What is the sysntax to refer to a subform in the conditions statement of a
query I tried the following

[forms]![orders]![subform].[orderdetail]![pricetable]

but that doesn't work

thanks

 




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 01:01 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.