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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |