473,509 Members | 8,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple subforms to one parent form

5 New Member
Please help!

I'm new to this but I'll try and be as clear as possible... I have a table tblCase with an autonumber key field CaseID. I have four other tables each having a many-to-one relationship to CaseID.

There is a form for each table and I’m trying to have the four subforms open from buttons within the parent form. Is this actually possible? I have been able to create a parent form with four subforms actually within, but it is too large and impractical. I know you can open one subform from a button as it is an option in the Wizard. I did try to open the subforms with command buttons stating that the caseID fields had to be the same in both but then I can not add new records.

Any help would be really appreciated, I've only been using Access a few months and other posts on this site have already been invaluable.

Thanks
Mar 25 '08 #1
4 2912
orangeCat
83 New Member
Please help!

I'm new to this but I'll try and be as clear as possible... I have a table tblCase with an autonumber key field CaseID. I have four other tables each having a many-to-one relationship to CaseID.

There is a form for each table and I’m trying to have the four subforms open from buttons within the parent form. Is this actually possible? I have been able to create a parent form with four subforms actually within, but it is too large and impractical. I know you can open one subform from a button as it is an option in the Wizard. I did try to open the subforms with command buttons stating that the caseID fields had to be the same in both but then I can not add new records.

Any help would be really appreciated, I've only been using Access a few months and other posts on this site have already been invaluable.

Thanks
You may wish to look at this site.
Form_SubForm_Stuff
near page 5-24 or so for some of the rationale and tips.
Mar 25 '08 #2
louisjones
5 New Member
Thanks for the help, but ideally I dont want all of the subforms 'open' on the main form; I want command buttons to open them in stand alone windows. Any ideas?
Mar 25 '08 #3
solom190
5 New Member
Thanks for the help, but ideally I dont want all of the subforms 'open' on the main form; I want command buttons to open them in stand alone windows. Any ideas?
Did you ever figure out the solution to this problem? I am trying to do the exact same thing. Only problem I am having is when putting information into the stand-alone forms the foriegn key value (in the underlying table) that is in subform does not get populated with the primary key value of the parent form that entered before opening the subform. I used this code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command52_Click()
  2. On Error GoTo Err_Command52_Click
  3.  
  4.     Dim stDocName As String
  5.     Dim stLinkCriteria As String
  6.  
  7.     stDocName = "frmHearings"
  8.  
  9.     stLinkCriteria = "[CaseNo]=" & "'" & Me![CaseNo] & "'"
  10.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  11.  
  12. Exit_Command52_Click:
  13.     Exit Sub
  14.  
  15. Err_Command52_Click:
  16.     MsgBox Err.Description
  17.     Resume Exit_Command52_Click
  18.  
  19. End Sub
  20.  
to filter the informtion that appears in the subform and it does filter the information if I manually type in the matching, in my case "CaseNo" in the "Hearing" table but it shouldn't work like that. I want the foreign key field in that "Hearing" table to be automatically populated, on the table level, with the primary key value of the parent form. Can you or anyone else lend some assistance? I have been racking my brain for a few days trying to get this and I am drawing complete blanks.
Oct 30 '08 #4
solom190
5 New Member
FYI:
I can't use tabs to fix this problem because I do not have enough space to work with screen-wise.
Oct 30 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
9515
by: Zeeshan Iqbal via AccessMonster.com | last post by:
hi, im trying to design a form with two subforms. subforms no.1 (orders) is connected to the main form by customer ID and i dont know how i can connect another subform (order details)to the first...
0
2682
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
7
2305
by: lauren quantrell | last post by:
A while back I got a requirement for the client to be able to adjust the relative heights of two subforms by click-dragging the mouse and I came up with a kludge solution using a border control...
11
4501
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
5
5652
by: Beacher | last post by:
I've noticed that you can only have a sub datasheet pointing to one table... is there anyway to change this? for example I have Customer | ---------- Customer/Product | -----------...
9
5245
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform relates to the main form using an identity key (this works). The second subform relates to both the main and first subform. But I want to...
1
2836
by: Barb.Richards | last post by:
I have created an append query that pulls information from one database, and will append the selected information into a new table. The fields are setup like 'number' 'category' 'code' 'shares' and...
3
2578
by: 6afraidbecause789 | last post by:
Think school - students - discipline interventions - misbehaviors - staff for this one....On a mainform frmStudentInterventions, I have linked a subform (sfrmMisbehaviors) with another subform...
5
2266
sickenhoofer
by: sickenhoofer | last post by:
I have a form w several subforms. The ultimate goal would be to click on a location, and have the data in the other subforms change to the data specific to that location. For this form, there are...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7347
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7073
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1571
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.