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  

Forms with multiple subforms



 
 
Thread Tools Display Modes
  #1  
Old August 14th, 2005, 06:49 PM
Eric F
external usenet poster
 
Posts: n/a
Default Forms with multiple subforms

I have a "Main Form" (not switchboard) that would have contact information
and would like to have a subform below. What I would like is some hyperlinks
that would change the subform. Clicking on the different links would change
and replace the subform. So I would have numerous subforms that would cycle
through depending on what link the user clicked.

My thoughts are that there needs to be some code that would reference a
table containing all the subforms. Then assign the links a specific number
that would refer to the subform. What I dont know is if there is a way to
replace subforms in a specific area.

Any thoughts would be greatly appreciated

~Eric


  #2  
Old August 15th, 2005, 12:04 AM
Ricky Hicks MVP
external usenet poster
 
Posts: n/a
Default

Why don't you use a tab control to place your subform in ???

R. Hicks

"Eric F" wrote:

I have a "Main Form" (not switchboard) that would have contact information
and would like to have a subform below. What I would like is some hyperlinks
that would change the subform. Clicking on the different links would change
and replace the subform. So I would have numerous subforms that would cycle
through depending on what link the user clicked.

My thoughts are that there needs to be some code that would reference a
table containing all the subforms. Then assign the links a specific number
that would refer to the subform. What I dont know is if there is a way to
replace subforms in a specific area.

Any thoughts would be greatly appreciated

~Eric



  #3  
Old August 15th, 2005, 04:59 PM
Tom Ross
external usenet poster
 
Posts: n/a
Default

Using a tabbed form is very good for some uses. But if you need to present
one subform while not showing the others dynamically try opening all of the
subforms in the same location and making them invisible. Then write some
code behind your buttons what will make the appropriate forms visible or
invisible. It works better than trying to change the source of a form.

Tom

I use the code below to switch subforms depending on which industry is
chosen in a combo box

-----------
Private Sub INDUSTRY_AfterUpdate()

Me.PowerProjectSubform.Visible = False
Me.MiningProjectSubform.Visible = False
Me.StructuralProjectSubform.Visible = False
Me.TransportationProjectSubform.Visible = False

If Me.INDUSTRY = "POWER" Then
Me.PowerProjectSubform.Visible = True

ElseIf Me.INDUSTRY = "MINING" Then
Me.MiningProjectSubform.Visible = True

ElseIf Me.INDUSTRY = "structural" Then
Me.StructuralProjectSubform.Visible = True

ElseIf Me.INDUSTRY = "transportation" Then
Me.TransportationProjectSubform.Visible = True

End If


End Sub
-------------------



"Eric F" wrote in message
...
I have a "Main Form" (not switchboard) that would have contact information
and would like to have a subform below. What I would like is some

hyperlinks
that would change the subform. Clicking on the different links would

change
and replace the subform. So I would have numerous subforms that would

cycle
through depending on what link the user clicked.

My thoughts are that there needs to be some code that would reference a
table containing all the subforms. Then assign the links a specific number
that would refer to the subform. What I dont know is if there is a way to
replace subforms in a specific area.

Any thoughts would be greatly appreciated

~Eric




  #4  
Old August 16th, 2005, 09:42 PM
FPSC
external usenet poster
 
Posts: n/a
Default

I am not an expert just a user but I did the same thing using macros that
will open or close each subform when the link got focus or lost focus.
In my case tabs were not a solution because I had more than 16 different
subforms to open.
I used a Main form with Options buttons and when each option is clicked it
opens a subform, and when you click on another option the first subform will
close and the second subform will open.
I hope this will help. Is another approaches but works very well.

SC

"Tom Ross" wrote in message
...
Using a tabbed form is very good for some uses. But if you need to
present
one subform while not showing the others dynamically try opening all of
the
subforms in the same location and making them invisible. Then write some
code behind your buttons what will make the appropriate forms visible or
invisible. It works better than trying to change the source of a form.

Tom

I use the code below to switch subforms depending on which industry is
chosen in a combo box

-----------
Private Sub INDUSTRY_AfterUpdate()

Me.PowerProjectSubform.Visible = False
Me.MiningProjectSubform.Visible = False
Me.StructuralProjectSubform.Visible = False
Me.TransportationProjectSubform.Visible = False

If Me.INDUSTRY = "POWER" Then
Me.PowerProjectSubform.Visible = True

ElseIf Me.INDUSTRY = "MINING" Then
Me.MiningProjectSubform.Visible = True

ElseIf Me.INDUSTRY = "structural" Then
Me.StructuralProjectSubform.Visible = True

ElseIf Me.INDUSTRY = "transportation" Then
Me.TransportationProjectSubform.Visible = True

End If


End Sub
-------------------



"Eric F" wrote in message
...
I have a "Main Form" (not switchboard) that would have contact
information
and would like to have a subform below. What I would like is some

hyperlinks
that would change the subform. Clicking on the different links would

change
and replace the subform. So I would have numerous subforms that would

cycle
through depending on what link the user clicked.

My thoughts are that there needs to be some code that would reference a
table containing all the subforms. Then assign the links a specific
number
that would refer to the subform. What I dont know is if there is a way to
replace subforms in a specific area.

Any thoughts would be greatly appreciated

~Eric






 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
create a report using multiple forms Prashant Setting Up & Running Reports 5 July 5th, 2005 05:31 PM
multiple lines (wrapping) in forms datasheet view for reports Derm Setting Up & Running Reports 0 June 22nd, 2005 02:36 PM
Subforms: User data entry accidentally creates multiple records David Kistner Using Forms 1 October 16th, 2004 08:25 PM
Multiple Add forms on one page? Richard C Using Forms 1 October 6th, 2004 08:10 PM
Multiple Many-To-Many Tables Tom Database Design 7 May 15th, 2004 03:47 AM


All times are GMT +1. The time now is 03:38 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.