A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I use option group to open correct subform in retangle box



 
 
Thread Tools Display Modes
  #1  
Old April 25th, 2008, 03:57 PM posted to microsoft.public.access.forms
Karen B Rhodes
external usenet poster
 
Posts: 1
Default How do I use option group to open correct subform in retangle box

I have option group with 3 buttons. When one is clicked...I want the correct
corresponding subform to open in retangle box next to option group.

I have buttons opening subform but it does it in new window not on main form

Thanks
Ads
  #2  
Old April 25th, 2008, 06:45 PM posted to microsoft.public.access.forms
AKphidelt
external usenet poster
 
Posts: 591
Default How do I use option group to open correct subform in retangle box

You'd have to create an on click event for the option group and use a Select
Case statement for the code.

So something like

Select Case optiongroup
Case 1
Me.Subform1.visible = True
Case 2
Me.Subform2.visible = True
End Select

This is just an example, you'd have to work with it to make sure it also
hides the correct subforms... etc.

"Karen B Rhodes" wrote:

I have option group with 3 buttons. When one is clicked...I want the correct
corresponding subform to open in retangle box next to option group.

I have buttons opening subform but it does it in new window not on main form

Thanks

  #3  
Old April 25th, 2008, 07:42 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default How do I use option group to open correct subform in retangle box

If you are using the OpenForm method, you will get the results you describe.
To open a form as a subform within the current form, you need to have a
subform control on the main form. Then you make the name of the form the
Source Object property value:

Me.MySubformControlName.SourceObject = "TheSubFormName"

--
Dave Hargis, Microsoft Access MVP


"Karen B Rhodes" wrote:

I have option group with 3 buttons. When one is clicked...I want the correct
corresponding subform to open in retangle box next to option group.

I have buttons opening subform but it does it in new window not on main form

Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.