Referring to Sub-Form Control in a Query

This is a discussion on Referring to Sub-Form Control in a Query within the ADO DAO RDO RDS forums in Framework and Interface Programming category; How do you refer to a sub-form control (on an open form) in a query? The code below is incorrect and opens the "Enter Parameter value" window. Forms!MainForm!SubForm.Forms!ControlName...

Go Back   Application Development Forum > Framework and Interface Programming > ADO DAO RDO RDS

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-09-2008, 09:48 AM
JimP
Guest
 
Default Referring to Sub-Form Control in a Query

How do you refer to a sub-form control (on an open form) in a query? The
code below is incorrect and opens the "Enter Parameter value" window.

Forms!MainForm!SubForm.Forms!ControlName


Reply With Quote
  #2  
Old 11-09-2008, 09:59 AM
Stuart McCall
Guest
 
Default Re: Referring to Sub-Form Control in a Query

"JimP" <j_pockmire@comcast.net> wrote in message
news:6c2dnUhi_NTWZYvUnZ2dnUVZ_gadnZ2d@giganews.com ...
> How do you refer to a sub-form control (on an open form) in a query? The
> code below is incorrect and opens the "Enter Parameter value" window.
>
> Forms!MainForm!SubForm.Forms!ControlName


You almost had it:

Forms!MainForm!SubForm.Form!ControlName

SubForm.Form means 'the form hosted by the subform control'


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:05 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.