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 / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

Accessing Sub Form Name when loading

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 14 Sep 2005 14:08 GMT
Hi

I have a common routine which is always called on the form open event. This
function is passed a parameter of (me.name).
The function itself interrogated the Forms collection and sets various
controls as desired.

My problem is where I have a sub form within a main form, when the main form
is loaded, it invokes the open of the sub form (which in turn activates the
open event), the value being passed over to the function is the name of the
sub form but this form is not in the forms collection (only the main form
is), which causes the finction to fail

Is there any way round this?

Many Thanks
Chris
Douglas J Steele - 14 Sep 2005 15:13 GMT
> Hi
>
[quoted text clipped - 10 lines]
>
> Is there any way round this?

Not really. As far as Access is concerned, the subform isn't open: only the
form itself is.

Signature

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

Marshall Barton - 14 Sep 2005 17:56 GMT
>I have a common routine which is always called on the form open event. This
>function is passed a parameter of (me.name).
[quoted text clipped - 8 lines]
>
>Is there any way round this?

I suggest that the common routine use the form object, Me,
(instead of the form name) as its argument.

Signature

Marsh
MVP [MS Access]

 
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.