Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2007

Tip: Looking for answers? Try searching our database.

Setting "As Control" for Nested Subforms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wrldruler - 18 Jan 2007 14:17 GMT
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
Douglas J. Steele - 18 Jan 2007 14:27 GMT
Try

Set cntrl_Month = Me("subfrm_Vacations_" & Month_Name)
Set cntrl_Listbox = cntrl_Month.Form("List" & strNum)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> I've got a series of nested sub-forms:
>
[quoted text clipped - 19 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.