By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,573 Members | 3,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,573 IT Pros & Developers. It's quick & easy.

Question on Forms

P: 61
I get that you can have a Form with multiple Pages (tabs). I also understand that you can have Page2 with a Subform pointing to a different table. And I see that on Page2, you can have 2 Subforms.

So, can you have more than 2 Subforms on Page2?

And can you have a Page3 with another Subform pointing to a different table?

Thanks,
Mike
Oct 15 '12 #1

✓ answered by Rabbit

How can you even link your subforms? Your intake is missing ClientID, AccidentID, and FollowupID. The parent source needs those fields if you are to link to its direct child. It sounds like your form structure looks like this:
Expand|Select|Wrap|Line Numbers
  1.            intake
  2.     _________|________
  3.    |         |        |
  4. client   accident   followup
  5.  
If that's how you're setting it up, then intake needs client id, accident id, and followup id to link on. But you're missing all three so I don't know how you can even link them.

Share this Question
Share on Google+
15 Replies


twinnyfo
Expert Mod 2.5K+
P: 3,284
Mike,

The options are pretty limitless..... I've had some forms with five tabs, and four subforms on a tab.... All pointing to different tables/queries. What do you have in mind?
Oct 15 '12 #2

Seth Schrock
Expert 2.5K+
P: 2,941
From what I have found, the limit is 7 levels of subforms, 754 controls/sections over the life of the form. (Limit for subforms?) The tab control doesn't really have any effect on the subform other than visually. I have done a database that had 5 subforms, so your three should be okay.

Update: I just found an article that gives better limitations: Subforms
Oct 15 '12 #3

P: 61
Hey twinnyfo,

Page1: Record Source = tblIntakeMaster

Link Field: IntakeMasterID (PK for tblIntakeMaster)

Page2: Record Source (tblClient) = sfrmClient

Link Field: ClientID (PK for tblClient)

Page3: Record Source (tblAccident) = sfrmAccident

Link Field: AccidentID (PK for tblAccident)


Page3: Record Source (tblFollowUp) = sfrmFollowUp

Link Field: FollowUpID (PK for tblFollowUp)


Basically I think that is it. It seems like either my Link Field is disappearing or when I put it back, my Subform on that Page disappears. I'm not really sure why?

Thanks,
Mike
Oct 15 '12 #4

twinnyfo
Expert Mod 2.5K+
P: 3,284
Mike,

One of the keys for this type of set-up (and Seth, you may have additoinal advice) is that you need to make sure all your keys stay straight and properly linked. In your example, I don't see any keys that would be linked to any of the other subforms.

For example, if you are the Agent, when you choose your AgentID, all the clients on Page 2 that belong to you would be filtered, if the Clients table had a fk for ClientID (just as an example).

So, in essence, when a record is changed on one page, you will want to ensure the Master-Child relationships are clear, so that the forms will update as a whole....
Oct 15 '12 #5

P: 61
Ok twinnyfo,

I am missing something, but believe this is my issue! So below are my main tables in order of my pages on the form. How do I set the keys to the subforms?

tblIntakeMaster: IntakeMasterID=PK

tblClient: ClientID=PK; IntakeMasterID=FK

tblAccident: AccidentID=PK; ClientID=FK

tblFollowUp: FollowUpID=PK; AccidentID=PK

Thanks,
Mike
Oct 15 '12 #6

P: 61
Ok, still trying to figure this out. Does this mean that my 3rd Table (tblAccident) must have a FK for both ClientID & IntakeMasterID? And my 4th Table (tblFollowUp) must have a FK for AccidentID, ClientID & IntakeMasterID?

Thanks,
Mike
Oct 15 '12 #7

Rabbit
Expert Mod 10K+
P: 12,366
What's the source and structure of the main form?
Oct 15 '12 #8

P: 61
Main form = tblIntakeMaster

Page2: Record Source (tblClient) = sfrmClient


Page3 has 2 Subforms:Record Source (tblAccident) = sfrmAccident

& Record Source (tblFollowUp) = sfrmFollowUp
Oct 15 '12 #9

Rabbit
Expert Mod 10K+
P: 12,366
What about the second part of my question? What's the structure of that table?
Oct 15 '12 #10

P: 61
@Rabbit,

I'm really sorry, but I don't know what that means. What exactly are you looking for?
Oct 15 '12 #11

P: 61
Oops I think you mean the fields, please see below:

tblIntakeMaster
IntakeMasterID = AutoNumber
ContactDate = Date/Time
EmployeeID = Number (linked to tblEmployee to populate drop down box)
IntakeSource = Number (linked to tblIntakeSource to populate drop down box)
ContactMethodID = Number (linked to tblContactMethod to populate drop down box)
AttorneyID = Number (linked to tblAttorney to populate drop down box)
DateAdded

I guess I'm new at this, so I hope this is what you need. Thanks
Oct 15 '12 #12

Rabbit
Expert Mod 10K+
P: 12,366
How can you even link your subforms? Your intake is missing ClientID, AccidentID, and FollowupID. The parent source needs those fields if you are to link to its direct child. It sounds like your form structure looks like this:
Expand|Select|Wrap|Line Numbers
  1.            intake
  2.     _________|________
  3.    |         |        |
  4. client   accident   followup
  5.  
If that's how you're setting it up, then intake needs client id, accident id, and followup id to link on. But you're missing all three so I don't know how you can even link them.
Oct 15 '12 #13

P: 61
@Rabbit, thank you! I didn't realize I needed the other fields in my main table. I will fix and see what happens. I appreciate your help.

Thanks,
Mike
Oct 15 '12 #14

Rabbit
Expert Mod 10K+
P: 12,366
Well, you only need them if that's how you're trying to set up your forms. If however you're trying to set it up in a cascade formation, i.e. a subform of a subform of a subform, then the main intake only needs the one directly below. And the one below the main form only needs the one directly below it.
Oct 15 '12 #15

P: 61
@Rabbit. Thanks for the update.
Oct 15 '12 #16

Post your reply

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