Groups | Search | Server Info | Login | Register
Groups > comp.databases.ms-access > #783
| From | Arsene@selenium.net |
|---|---|
| Newsgroups | comp.databases.ms-access |
| Subject | Re: Determine what the main form |
| Date | 2011-04-03 09:42 -0500 |
| Message-ID | <ec1hp6l81blguig61j2o6a1f4n54jh94v7@4ax.com> (permalink) |
| References | <2ae24$4d97810e$5356be6c$15797@cache110.multikabel.net> <e02fp6dn4e6kgtdhks53vco0glp6ue0s3q@4ax.com> |
On Sat, 02 Apr 2011 15:38:24 -0500, Marshall Barton <marshbarton@wowway.com> wrote: ><martin@hotmail.com> wrote: > >>I have a subform which I've always used in one main form. Now I would like >>to use the same subform in another main form, only the subform then needs a >>different record source and the behavior of the subform should at some >>points be slightly different which I'm planning to do in VBA. >> >>My questions are: how can I check in my subform by which mainform it is >>opened? And secondly: can I safely use the subform in 2 mainforms at the >>same time? > > >Sure you can do that. You can check the name of the main >form: > >Select Case Parent.Name >Case "main form 1" > ... >Case "main form 2" > ... >Case Else > MsgBox "wrong main form or not a subform" >End Select Marshall, So, in order to share one subform among multiple mainforms, should the above code (Select Case Parent.Name, etc.) be inserted in the subform's "On Load" event?
Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar
Determine what the main form <martin@hotmail.com> - 2011-04-02 22:03 +0200
Re: Determine what the main form Marshall Barton <marshbarton@wowway.com> - 2011-04-02 15:38 -0500
Re: Determine what the main form <martin@hotmail.com> - 2011-04-03 10:36 +0200
Re: Determine what the main form Arsene@selenium.net - 2011-04-03 09:42 -0500
Re: Determine what the main form Marshall Barton <marshbarton@wowway.com> - 2011-04-03 12:53 -0500
Re: Determine what the main form Arsene@selenium.net - 2011-04-03 13:01 -0500
Re: Determine what the main form Marshall Barton <marshbarton@wowway.com> - 2011-04-03 17:23 -0500
Re: Determine what the main form <martin@hotmail.com> - 2011-04-04 17:00 +0200
Re: Determine what the main form Marshall Barton <marshbarton@wowway.com> - 2011-04-04 11:33 -0500
Re: Determine what the main form Arsene@selenium.net - 2011-04-08 09:33 -0500
csiph-web