![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hey there, im stuck on a rather easy problem...well apparently not for me. I have a Main form (F_Main) wich has 2 tabs on it (Basic and Additional) each of the tabs has a subform/subreport filed with correspondingly inserted forms: F_basic and F_additional. I woud like the Additional Tab to show me records that have the same B_ID as the one shown in the Basic tab. I know how to do it when there are no tabs but i seem to be stuck on the Master filed / child filed syntax here... Should it be: child filed : B_ID (F_additional form is based on a Table which is linked to the tbl_basic with B_ID filed - so that only ID's from tbl_basic are added to tbl_additional) master filed : F_Main.Basic.Fbasic!B_ID ?? I know that later ill have to do a requery on the Basic tab so that the F_additional changes as well..so naturally if anyone could help me with the VBA syntax as well.. on the on current event i would write: Me.Parent![F_additional].requery should that do the trick? Many thanks in advance since this little issue is testing my nerves... |
#3
| |||
| |||
|
|
Tabs have no effect on how you handle sub-form controls or any other controls in a form. *Tabs are simply organizational tools. Setting up the Master/Child references can be tricky. *Normally, you link from data on the main form to the child sub-forms. The way I handle this situation is to add an unbound control (invisible) to the main form and then populate it with the linking value from the F_Basic sub-form. *Then I link F_Additional to that control's value. The Unbound control's Control Source might read something like =Me.F_Basic.Form.B_ID That should change each time you change records in the F_Basic sub-form. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County On 11/23/2010 2:11 AM, Piotr Jaruga wrote: Hey there, im stuck on a rather easy problem...well apparently not for me. I have a Main form (F_Main) wich has 2 tabs on it (Basic and Additional) each of the tabs has a subform/subreport filed with correspondingly inserted forms: F_basic and F_additional. I woud like the Additional Tab to show me records that have the same B_ID as the one shown in the Basic tab. I know how to do it when there are no tabs but i seem to be stuck on the Master filed / child filed syntax here... Should it be: child filed : B_ID (F_additional form is based on a Table which is linked to the tbl_basic with B_ID filed - so that only ID's from tbl_basic are added to tbl_additional) master filed : F_Main.Basic.Fbasic!B_ID ?? I know that later ill have to do a requery on the Basic tab so that the F_additional changes as well..so naturally if anyone could help me with the VBA syntax as well.. on the on current event i would write: Me.Parent![F_additional].requery should that do the trick? Many thanks in advance since this little issue is testing my nerves... |
![]() |
| Thread Tools | |
| Display Modes | |
| |