PC Review


Reply
Thread Tools Rate Thread

how do I pass a subform's field to a query that a new form is based on

 
 
DJ McNeill via AccessMonster.com
Guest
Posts: n/a
 
      16th Jun 2005
Hi,

I have found a note on how to pass a forms field to a query.

[Forms]![Form Name]![Control Name]

But how do I pass a subform's field value to a query.

I tried [Forms]![Sub form name]![Control Name] that didn't work (I think
because the query didn't think the sub form was open)

Can some one help me out?

Thanks
DJ

--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
 
 
 
DJ McNeill via AccessMonster.com
Guest
Posts: n/a
 
      16th Jun 2005
figured it out:

[forms]![Form name]![sub form name]![control name]

--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      16th Jun 2005
Try:
[Forms]![Form Name]![Sub form name].Form![Control Name]

For an explanation see:
Referring to Controls on a Subform
at:
http://allenbrowne.com/casu-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"DJ McNeill via AccessMonster.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Hi,
>
> I have found a note on how to pass a forms field to a query.
>
> [Forms]![Form Name]![Control Name]
>
> But how do I pass a subform's field value to a query.
>
> I tried [Forms]![Sub form name]![Control Name] that didn't work (I think
> because the query didn't think the sub form was open)
>
> Can some one help me out?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass selection in multi-field listbox to query-based subform (repo LeAnne Microsoft Access Forms 7 13th Jan 2009 11:29 PM
Pass selection in multi-field listbox to query-based subform LeAnne Microsoft Access Forms 2 8th Jan 2009 02:34 PM
Pass Result From Query to a field on a subform =?Utf-8?B?Um9u?= Microsoft Access Queries 5 9th Nov 2005 01:51 AM
pass form field to subform? =?Utf-8?B?QnJvb2s=?= Microsoft Access Forms 5 18th Aug 2005 05:20 AM
pass a calculated form field to a subform field? =?Utf-8?B?QnJvb2s=?= Microsoft Access Forms 22 28th Apr 2005 04:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:18 PM.