Solved

multiple entries in a form and a table

Posted on 2013-10-30
6
223 Views
Last Modified: 2013-10-31
Hi,

I have a table with some fields: Training name, training time, and people.

My problem is that in the people field can exist more than one person and I want to have the ability to filter by people and enter the information of the people in a form. Any idea?
0
Comment
Question by:joyacv2
  • 3
  • 2
6 Comments
 
LVL 19

Assisted Solution

by:Ken Butters
Ken Butters earned 500 total points
ID: 39612838
If it would be a better design to have a 'normalized' table.  By normalized I mean that a given field does not contain multiple things... like multiple names.

In this case I would design it as :

1) Training Table --- Which holds things that pertain to the Training.  Like the location, time, subject etc.

2) People Table -- Which hold things that pertain to people, like first Name / last Name etc.

3) An 'Associate' table.  This table would be used to define your relationship between the people and the Training.  one row in this table would typically consist of an ID from the Training table, and an ID from the people table.  This would then be used to define which people are taking what training.

A common name for this type of relationship is a "Many-to-Many" relationship.

Once you have your tables and the relationships built, then you would create a query that gives you the results that you are looking for, and your form would be based on the new query, not on any of the tables.
0
 
LVL 1

Author Comment

by:joyacv2
ID: 39612850
HI,

But what can I do with the form, where I enter in the form the list of participants. In the form I need to specify the training and the participants?
0
 
LVL 19

Assisted Solution

by:Ken Butters
Ken Butters earned 500 total points
ID: 39612875
Sounds like you form you want is "Training" based... meaning that your focus is mostly on setting up a training class?

One way to solution that would be to create form that is centered on the Training (it can be sourced on the training table), and a subform that lists the people that can be added to the training class.

here is an example of this:

http://ms-access-tips.blogspot.com/2012/02/creating-form-for-many-to-many.html
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:joyacv2
ID: 39612894
sorry, but I don't understand because the only thing that I need is to create a field that accepts many person names in the form? How I can use a subform of this without making relationships between the tables?
0
 
LVL 19

Accepted Solution

by:
Ken Butters earned 500 total points
ID: 39613264
You cannot create a sub-form like I descirbed without making relationships between the tables.

Is there some reason you cannot, or do not want to create the necessary tables?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39614068
joyacv2, (No Points wanted)

buttersk is correct, your data is not formatted properly to do what you are asking.

If one "training" can have a many "people" (and conversely, one Person can have many "trainings") Then your design need to be a bit more robust and flexible.

This is why you should always ask if your design is correct before you design your forms.

If you are new to database design (keys, relationships, ...etc), it will take a while to get this design up and running.
What buttersk  posted is the standard why of setting this up, so please continue working with them to get this set up....
But once you do, ...things like what you are asking here will be "easy" instead of difficult.

The good news is that there is a fairly good feature called a "Multivalued Field" (in Access 2007 and higher) to make this a lot easier to do...
See here for more info:
http://office.microsoft.com/en-us/access-help/guide-to-multivalued-fields-HA001233722.aspx

;-)

JeffCoachman
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now