Subform/Subreport (1 Viewer)

vcarrill

Registered User.
Local time
Today, 07:26
Joined
Aug 22, 2019
Messages
60
Hello!

Can you please advise on how I could have the following show up by default in the subform for every single person?
I have (1) table with:
Firstname
LastName
EmpID

The second table with:
EmpID
AntennaType
AssemblyNumber
TaskName

Here is an example of the data:
1647286456333.png

Thank you for the help!
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 06:26
Joined
Oct 29, 2018
Messages
21,473
As long as we're not talking about placeholder records, you can use an APPEND query to assign the child records in one go.
 

vcarrill

Registered User.
Local time
Today, 07:26
Joined
Aug 22, 2019
Messages
60
So would this permit the information to be available in the subform? I have several to add and need their leads to be able and update their status if they are In Training, Proficient, for every Task. Thank you
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:26
Joined
Oct 29, 2018
Messages
21,473
So would this permit the information to be available in the subform? I have several to add and need their leads to be able and update their status if they are In Training, Proficient, for every Task. Thank you
Whatever you add to the table, via a query or manually, should be available in the subform.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:26
Joined
Feb 19, 2002
Messages
43,275
Can you please advise on how I could have the following show up by default in the subform for every single person?
I don't see any relationship between the two tables. How would you decide which person was associated with which antenna?

You might want to post a picture of what you are trying to achieve.
 

vcarrill

Registered User.
Local time
Today, 07:26
Joined
Aug 22, 2019
Messages
60
I don't see any relationship between the two tables. How would you decide which person was associated with which antenna?

You might want to post a picture of what you are trying to achieve.
My apologies I failed to add EmpID to the 2nd table, please see my correction above, thank you.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 14:26
Joined
Jul 9, 2003
Messages
16,282
I have a Blog where I demonstrate how to automatically add a Checklist in the subform on a main form. Often people have a sub-form which needs to be filled with the same data for every customer and/or order. The data operator has to enter the individual items in the sub form. In my blog Here:-


I take you through the process of creating the checklist and how to automatically add it. I think you need to follow a very similar process to solve your problem.
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:26
Joined
Feb 19, 2002
Messages
43,275
If I understand the question correctly, you would create a main form for the employee and a subform for the other table. A subform is simply a form that is shown in a subform control on a main form.

If you have create the table relationships using the relationship window, Access will automagically connect the main form with the subform when you add the subform. If the two tables are not related, you will manually need to choose the master/child relationship so Access will know how the two tables are connected.
 

vcarrill

Registered User.
Local time
Today, 07:26
Joined
Aug 22, 2019
Messages
60
If I understand the question correctly, you would create a main form for the employee and a subform for the other table. A subform is simply a form that is shown in a subform control on a main form.

If you have create the table relationships using the relationship window, Access will automagically connect the main form with the subform when you add the subform. If the two tables are not related, you will manually need to choose the master/child relationship so Access will know how the two tables are connected.
Ms. Hartman, I did as you stated above. The issue I am having is that I need all of the "data" to load in the subform for every employee as a default. I am unsure on how to accomplish this?

Basically there is a core of processes that every employee is taught by product. The leads use this as a training guide and after every single process they indicate where the employee stands in their training (In Training, Proficient, etc).

I hope this provides further clarity on what it is I am trying to do with Access versus using the current Excel sheet that is quite cumbersome.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:26
Joined
Feb 19, 2002
Messages
43,275
Sounds like what you are missing is a third table. This table is sometimes called a junction table because it joins two entities and I think that is what you might be trying to do. It is how you implement a many-many relationship

In this case, the subform would be bound to the junction table.

You have two views of data. One from the perspective of the employee and the other from the perspective of the product. The junction table would contain the EmpID and the ProductID (or whatever the PK of the other table is called). That implements the m-m by connecting the two tables. You also have what we call intersection data. It is data that is related to BOTH of the joined tables. For example, you might have the date a course was completed and a grade.

I'm guessing though that the application needs more than what I have described. You might also need certifications and another junction table for when they were earned.

For now, I'm uploading a m-m example. See if you can, in your mind, translate it to your situation.
 

Attachments

  • ManyToMany20210414.zip
    1.5 MB · Views: 202

vcarrill

Registered User.
Local time
Today, 07:26
Joined
Aug 22, 2019
Messages
60
Sounds like what you are missing is a third table. This table is sometimes called a junction table because it joins two entities and I think that is what you might be trying to do. It is how you implement a many-many relationship

In this case, the subform would be bound to the junction table.

You have two views of data. One from the perspective of the employee and the other from the perspective of the product. The junction table would contain the EmpID and the ProductID (or whatever the PK of the other table is called). That implements the m-m by connecting the two tables. You also have what we call intersection data. It is data that is related to BOTH of the joined tables. For example, you might have the date a course was completed and a grade.

I'm guessing though that the application needs more than what I have described. You might also need certifications and another junction table for when they were earned.

For now, I'm uploading a m-m example. See if you can, in your mind, translate it to your situation.
This is amazing, thank you! The last bit of assistance I need is the input mask for the following: 123456-500 and 123456-500ABC. I cannot seem to get the field to accept these type of entries. Thank you very much Ms. Hartman.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:26
Joined
Feb 19, 2002
Messages
43,275
You're welcome. Help didn't help you with the input mask? I can't do the research right now. Maybe someone else can help.
 

Users who are viewing this thread

Top Bottom