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  

Conditional Subforms?



 
 
Thread Tools Display Modes
  #1  
Old February 15th, 2010, 04:22 AM posted to microsoft.public.access.forms
Faraz A. Qureshi
external usenet poster
 
Posts: 164
Default Conditional Subforms?

I have three different styles of subforms based on a single table.
Can I have all the three subforms be inserted in a major one but only ONE
being displayed, depending upon the type of entry selected in the major form?
--
Thanx & Best Regards,

Faraz!
  #2  
Old February 15th, 2010, 04:55 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default Conditional Subforms?

Yes, you just set the Source Object of the subform control.

Me.[NameOfSubformControl].SourceObject = "frmSubform1"

The above code puts frmSubform1 as the subform into the subform control.

To change to another subform,
Me.[NameOfSubformControl].SourceObject = "frmNextSubform"


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"Faraz A. Qureshi" wrote in
message ...
I have three different styles of subforms based on a single table.
Can I have all the three subforms be inserted in a major one but only ONE
being displayed, depending upon the type of entry selected in the major
form?
--
Thanx & Best Regards,

Faraz!



  #3  
Old February 15th, 2010, 05:42 AM posted to microsoft.public.access.forms
Faraz A. Qureshi
external usenet poster
 
Posts: 164
Default Conditional Subforms?

Thanx Jeanette for your prompt response. However, how to insert an IF type
condition/code to control/change subform based upon the main form's entry?
--
Thanx & Best Regards,

Faraz!


"Jeanette Cunningham" wrote:

Yes, you just set the Source Object of the subform control.

Me.[NameOfSubformControl].SourceObject = "frmSubform1"

The above code puts frmSubform1 as the subform into the subform control.

To change to another subform,
Me.[NameOfSubformControl].SourceObject = "frmNextSubform"


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"Faraz A. Qureshi" wrote in
message ...
I have three different styles of subforms based on a single table.
Can I have all the three subforms be inserted in a major one but only ONE
being displayed, depending upon the type of entry selected in the major
form?
--
Thanx & Best Regards,

Faraz!



.

 




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 02:08 AM.


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