Similar Threads:
1.Tab controls nested 3 levels deep, using forms/subforms nested 3 levels
This works fine for me, and is very useful.
You can't nest tab controls on each other, so:
* start with main form
* tab control 1 is placed on main form
* subform 1 is placed on tab control 1
* tab control 2 is placed on subform 1
* subform 2 is placed on tab control 2
* tab control 3 is placed on subform 2
* subform 3 is placed on tab control 3
* etc.
A reference to the lowest-level subform can be done this way:
Forms.mainForm.Form.subForm1.Form.subForm2.Form.subForm3.Form.RecordSource =
"sql statement"
Nothing too groundbreaking. Just wondering if others have tried it, and
have gone any levels deeper?
2.Setting "As Control" for Nested Subforms
I've got a series of nested sub-forms:
(1a) Main Parent
(1b) Sub-form: Header of calendar -- Months, Days of Week, etc.
(1c) Continuous Sub-form: Displays employee vacations
I need to iterate through the sub-form name ("subfrm_Vacations_January,
subfrm_Vacations_February, ...", reference a nested subform with a
constant name ("subfrm_Vacation_Details"), and then iterate through a
bunch of Listboxes on the nested subform (List_01, List_02....)
I can reach the sub-form via:
Set cntrl_Month = Me("subfrm_Vacations_" & Month_Name)
I can reach the Listboxes via:
Set cntrl_Listbox = subfrm_Vacation_Details("List" & strNum)
But I can't figure out how to put the two together. I want to do
something like:
cntrl_Listbox = cntrl_Month.subfrm_Vacation_Details("List" & strNum)
Thanks
3.Set focus in mult-nested controls
I have the following:
Main form with 1 Tab Control with 8 pages.
On Tab_Page1, I have 4 combo boxes and a subform.
The subform contains a Tab Control with 4 pages; each TabPage corresponds to
each of the 4 combo boxes .
What I am trying to accomplish:
When I select one of the combo boxes, I would like the corresponding TabPage
in the subform to be "displayed" and the focus returned back to the combo box.
(i.e. show Tab_Page1 when combobox1 is selected, show Tab_Page2 when
combobox2 is selected, show Tab_Page3 when combobox3 is selected; show
Tab_Page4 when combobox4 is selected)
I assume this will required code in the "On Got Focus" of each combo box?
4.setting the focus to a nested subform
This thing is going to make me rip what little hair I have right out...
Okay, I have a main form. On the main form, I have a subform and, on that
subform, an additional nested subform. I'm trying to set the focus to a
control on the nested subform, but can't get it to work. I've added the
following lines as researched on-line:
Forms![Main].Form!Preview.SetFocus
Forms![Main].Form!Preview.Form![EstimatesSub].SetFocus
Forms![Main].Form!Preview.Form![EstimatesSub].form![ServiceType].SetFocus
Here's the rub...upon code execution, the expected control does not appear
to have the focus; there's no cursor or highlight at all on the control.
But, when I press the delete key (discovered this behavior by mistake) the
data in the control that I intended to have the focus gets deleted. Of
course, at that point the control really does have the focus...but I really
need my data.
My intent is to set the focus prior to making a search feature available
thereby saving my users some keystrokes...just can't seem to get that control
fully exposed.
Anyone have any ideas? Sure appreciate it.
5.Repost: Listening for events on subform nested in a tab control
In Access 2002, how do I code a reference to a sub-form in
a main form from an independent third form. The syntax to
reference a sub-form.control does not work and is not
appropriate for my need. I need the sub form iteself, not
a control on the subform. Here is the full story:
I wish to synchronize a "MyPopUpForm" with custom events
generated in "MyMainForm" and "MySubForm".
MySubForm is nested on a page in a tab control
on "MyMainForm".
"MyPopUpForm" is opened via a control button on
MyMainForm, so I'm sure both MyMainForm and MySubForm are
loaded when MyPopUpForm fires its OnLoad event.
MyMainForm raises event "NewEmp(EmpID)" that MySubForm and
MyPopUpForm successfully handle.
So far, so good with my code. Now for what's not working..
MySubForm raises event CurRec(EffectiveDate).
MyPopUpForm should catch and handle the event by updating
a text box control with the EffectiveDate.
Problem: I keep getting messages at runtime that
MySubForm cannot be found.
Here's my code:
-----------------------------------------------------
On "MySubForm", I have declared a custom event in the
global area:
Public Event CurRec(EffectiveDate)
also I have:
Private Sub Form_Current()
RaiseEvent CurRec(EffectiveDate)
End Sub
--------------------------------------------
In the global area of "myPopUp" form I have:
Dim WithEvents subComp As Form_MySubForm
Then I coded:
Private Sub Form_Load()
Set subComp = Forms!frmEmpMaint!MySubForm
End Sub
-------------------------------------------------
My problem is coding the proper syntax for the "Set
subComp" statement above. Various coding attempts have
all lead to runtime messages that generally say the
subform can't be found.
Does anyone you know know how to code this?
6. Referencing a control in a nested subform
7. Listening for events on subform nested in a tab control
8. use a value in a text control to goto a record on a nested subform