dbTalk Databases Forums  

Referring to control on a subform within a subform

comp.databases.ms-access comp.databases.ms-access


Discuss Referring to control on a subform within a subform in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
emanning
 
Posts: n/a

Default Referring to control on a subform within a subform - 11-03-2010 , 09:27 AM






I have a subform whose SourceObject is set depending on the subform
the user wants to see. One of the subforms has a subform within it.
I'm trying to requery a combobox in the inner subform. How do I refer
to that combobox? I've tried the following:

NOTE: (frmRegistrations is the parent form,
subfrmRegistrations_People is what the SourceObject is set to,
subfrmRegistrations_Addresses is the subform within
subfrmRegistrations_People):

Forms!frmRegistrations!
subfrmRegistrations.subfrmRegistrations_Addresses! cboCity.Requery (I
get an error message that "Object doesn't support this property or
method"

Forms!frmRegistrations!subfrmRegistrations.Form!
subfrmRegistrations_Addresses!cboCity.Requery (error "Microsoft
Office Access can't find the field 'subfrmRegistrations_Addresses'
referred to in your expression.")

Forms!frmRegistrations!subfrmRegistrations_People. Form!
subfrmRegistrations_Addresses!cboCity.Requery (error "Microsoft Office
Access can't find the field 'subfrmRegistrations_People' referred to
in your expression.")

Thanks for any help or advice.

Reply With Quote
  #2  
Old   
John Spencer
 
Posts: n/a

Default Re: Referring to control on a subform within a subform - 11-03-2010 , 09:34 AM






Forms!frmRegistrations!subfrmRegistrations
..FORM.subfrmRegistrations_Addresses.FORM!cboCity. Requery

The above assumes that the subform CONTROLS are named subfrmRegistrations and
subFrmRegistrations_addresses. The control may have a different name then the
form it contains.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 11/3/2010 11:27 AM, emanning wrote:
Quote:
I have a subform whose SourceObject is set depending on the subform
the user wants to see. One of the subforms has a subform within it.
I'm trying to requery a combobox in the inner subform. How do I refer
to that combobox? I've tried the following:

NOTE: (frmRegistrations is the parent form,
subfrmRegistrations_People is what the SourceObject is set to,
subfrmRegistrations_Addresses is the subform within
subfrmRegistrations_People):

Forms!frmRegistrations!
subfrmRegistrations.subfrmRegistrations_Addresses! cboCity.Requery (I
get an error message that "Object doesn't support this property or
method"

Forms!frmRegistrations!subfrmRegistrations.Form!
subfrmRegistrations_Addresses!cboCity.Requery (error "Microsoft
Office Access can't find the field 'subfrmRegistrations_Addresses'
referred to in your expression.")

Forms!frmRegistrations!subfrmRegistrations_People. Form!
subfrmRegistrations_Addresses!cboCity.Requery (error "Microsoft Office
Access can't find the field 'subfrmRegistrations_People' referred to
in your expression.")

Thanks for any help or advice.

Reply With Quote
  #3  
Old   
emanning
 
Posts: n/a

Default Re: Referring to control on a subform within a subform - 11-03-2010 , 09:53 AM



On Nov 3, 10:34*am, John Spencer <JSPEN... (AT) Hilltop (DOT) umbc> wrote:
Quote:
Forms!frmRegistrations!subfrmRegistrations
.FORM.subfrmRegistrations_Addresses.FORM!cboCity.R equery

The above assumes that the subform CONTROLS are named subfrmRegistrationsand
subFrmRegistrations_addresses. *The control may have a different name then the
form it contains.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 11/3/2010 11:27 AM, emanning wrote:







I have a subform whose SourceObject is set depending on the subform
the user wants to see. *One of the subforms has a subform within it.
I'm trying to requery a combobox in the inner subform. *How do I refer
to that combobox? *I've tried the following:

* * * NOTE: (frmRegistrations is the parent form,
subfrmRegistrations_People is what the SourceObject is set to,
subfrmRegistrations_Addresses is the subform within
subfrmRegistrations_People):

* * * Forms!frmRegistrations!
subfrmRegistrations.subfrmRegistrations_Addresses! cboCity.Requery *(I
get an error message that "Object doesn't support this property or
method"

* * * Forms!frmRegistrations!subfrmRegistrations.Form!
subfrmRegistrations_Addresses!cboCity.Requery *(error "Microsoft
Office Access can't find the field 'subfrmRegistrations_Addresses'
referred to in your expression.")

* * * Forms!frmRegistrations!subfrmRegistrations_People. Form!
subfrmRegistrations_Addresses!cboCity.Requery (error "Microsoft Office
Access can't find the field 'subfrmRegistrations_People' referred to
in your expression.")

Thanks for any help or advice.
Thanks. I modifed it per your suggestion. Now I get the error
message "Application-defined or object-defined error". I noticed that
cboCity does get requeried if I get off the current record and back
on. So now I'm wondering if this is really the correct coding that is
needed. Maybe I should try something else besides Requery??

Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.