dbTalk Databases Forums  

connecting comboboxes in a subform

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


Discuss connecting comboboxes in a subform in the comp.databases.ms-access forum.



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

Default connecting comboboxes in a subform - 03-07-2008 , 10:01 AM






Hi guys,

i have a form(myform) where i connected a pair of comboboxes for
managers and supervisers, so when you choose a manager the second
combo shows only those supervisors who report to him. So i had a query
for supervisors list where i put a condition under managers name:
[Forms]![myform]![Fa_manager] and also an after update requery
Me.FA_supervisor.Requery. SO everything worked fine.

Then i had to add more text boxes and combos to my form and it became
really crowded, so i decided to add 2 tabs and two subforms for each
tab accordingly. Managers and supervisors combos were moved on
subform1 and now i'm spinning the weels trying to make them work as
they did on a single form.
Tryed to adjust the query condition to [Forms]![subformform1]!
[Fa_manager] and some modification to the Requery code but alas.

Could someone give me a headup how to get over this issue? Maybe i
should create an invisible textbox on myform, connect it to the
managers combobox in the subform1 and requery the new textbox?

Thanks and Regards

Mike



Reply With Quote
  #2  
Old   
Wayne Gillespie
 
Posts: n/a

Default Re: connecting comboboxes in a subform - 03-07-2008 , 11:00 AM






On Fri, 7 Mar 2008 08:01:13 -0800 (PST), Mike <mikhail_bogorad (AT) hotmail (DOT) com>
wrote:

Quote:
Hi guys,

i have a form(myform) where i connected a pair of comboboxes for
managers and supervisers, so when you choose a manager the second
combo shows only those supervisors who report to him. So i had a query
for supervisors list where i put a condition under managers name:
[Forms]![myform]![Fa_manager] and also an after update requery
Me.FA_supervisor.Requery. SO everything worked fine.

Then i had to add more text boxes and combos to my form and it became
really crowded, so i decided to add 2 tabs and two subforms for each
tab accordingly. Managers and supervisors combos were moved on
subform1 and now i'm spinning the weels trying to make them work as
they did on a single form.
Tryed to adjust the query condition to [Forms]![subformform1]!
[Fa_manager] and some modification to the Requery code but alas.

Could someone give me a headup how to get over this issue? Maybe i
should create an invisible textbox on myform, connect it to the
managers combobox in the subform1 and requery the new textbox?

Thanks and Regards

Mike

The full reference to the combo would be -

Forms!myForm!Subform1.Form!Fa_Manager

Forms!MyForm references the main form.
!Subform1 references the subform CONTROL on the main form.
..Form references the FORM contained within the subform1 CONTROL.
!Fa_Manager references the combo within the subform.


Wayne Gillespie
Gosford NSW Australia


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

Default Re: connecting comboboxes in a subform - 03-07-2008 , 11:24 AM



On Mar 7, 12:00*pm, Wayne Gillespie <best... (AT) NOhotmailSPAM (DOT) com.au>
wrote:
Quote:
On Fri, 7 Mar 2008 08:01:13 -0800 (PST), Mike <mikhail_bogo... (AT) hotmail (DOT) com
wrote:





Hi guys,

i have a form(myform) where i connected a pair of comboboxes for
managers and supervisers, so when you choose a manager the second
combo shows only those supervisors who report to him. So i had a query
for supervisors list where i put a condition under managers name:
[Forms]![myform]![Fa_manager] and also an after update requery
Me.FA_supervisor.Requery. SO everything worked fine.

Then i had to add more text boxes and combos to my form and it became
really crowded, so i decided to add *2 tabs and two subforms for each
tab accordingly. Managers and supervisors combos were moved *on
subform1 and now i'm spinning the weels trying to make them work as
they did on a single form.
Tryed to adjust the query condition to [Forms]![subformform1]!
[Fa_manager] and some modification to the Requery code but alas.

Could someone give me a headup how to get over this issue? Maybe i
should create an invisible textbox on myform, connect it to the
managers combobox in the subform1 and requery the new textbox?

Thanks and Regards

Mike

The full reference to the combo would be -

Forms!myForm!Subform1.Form!Fa_Manager

Forms!MyForm references the main form.
!Subform1 references the subform CONTROL on the main form.
.Form references the FORM contained within the subform1 CONTROL.
!Fa_Manager references the combo within the subform.

Wayne Gillespie
Gosford NSW Australia- Hide quoted text -

- Show quoted text -
Thanks Wayne,
i have changed the query reference to [Forms]![frm_fundinput]!
[subfrm_fundinput2].[form]![Fa_manager]
but nothing happens, when i choose Manager the Supervisors combobox
remains empty for some reason.
Do i also have to adjust the AfterUpdate requery code?
Thanks
Mike


Reply With Quote
  #4  
Old   
timmg
 
Posts: n/a

Default Re: connecting comboboxes in a subform - 03-07-2008 , 02:24 PM



On Mar 7, 11:24*am, Mike <mikhail_bogo... (AT) hotmail (DOT) com> wrote:
...
Quote:
i have changed the query reference to [Forms]![frm_fundinput]!
[subfrm_fundinput2].[form]![Fa_manager]
but nothing happens, ...
Do i also have to adjust the AfterUpdate requery code?
...

If you used copy and paste you'll need to make sure that the
AfterUpdate property is set to [Event Procedure].

Copy and paste clears associated actions in a control - the code is
still there, it just doesn't know it's supposed to execute.

hth,

tim mills-groninger


Reply With Quote
  #5  
Old   
Mike
 
Posts: n/a

Default Re: connecting comboboxes in a subform - 03-10-2008 , 01:09 PM



On Mar 7, 4:24*pm, timmg <tmillsgronin... (AT) gmail (DOT) com> wrote:
Quote:
On Mar 7, 11:24*am, Mike <mikhail_bogo... (AT) hotmail (DOT) com> wrote:
...> i have changed the query reference to [Forms]![frm_fundinput]!
[subfrm_fundinput2].[form]![Fa_manager]
but nothing happens, ...
Do i also have to adjust the AfterUpdate requery code?

...

If you used copy and paste you'll need to make sure that the
AfterUpdate property is set to [Event Procedure].

Copy and paste clears associated actions in a control - the code is
still there, it just doesn't know it's supposed to execute.

hth,

tim mills-groninger
Thanks guys,
revised all syntax and proper names, now it works fine.


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.